mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
Refs #41:
- Changed: Qt5 has a different method to connect signals and slots together based on C++x11 Migrated the first bunch of occurences to the new method. - Fixed: CDebug singleton was not created yet in BlackD. Crashed the application.
This commit is contained in:
@@ -6,8 +6,10 @@ using namespace BlackMisc;
|
||||
|
||||
Client::Client(QObject *parent) : QObject(parent), comclient(IContext::getInstance())
|
||||
{
|
||||
connect(&comclient, SIGNAL(doError(QAbstractSocket::SocketError,QString)), this, SLOT(onError(QAbstractSocket::SocketError,QString)));
|
||||
connect(&comclient, SIGNAL(doConnected()), this, SLOT(onClientConnected()));
|
||||
connect(&comclient, &BlackMisc::CComClient::doError,
|
||||
this, &Client::onError);
|
||||
connect(&comclient, &BlackMisc::CComClient::doConnected,
|
||||
this, &Client::onClientConnected);
|
||||
|
||||
QString address = "127.0.0.1";
|
||||
comclient.connectTo(address, 6809);
|
||||
@@ -33,4 +35,4 @@ void Client::onClientConnected()
|
||||
|
||||
comclient.sendMessage(testmsg->getID(), message_data);
|
||||
delete testmsg;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user