X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fmain%2Fmonoapplication.cpp;h=f6dc5221083dde604b1558e8b4f21ec57ad8836e;hb=f9efdde7f3a6004af8f834c409cfa6ae1d877692;hp=068ec711e1bd6c388c23140cac712c5f76ddf024;hpb=4ce53949ab7d52a49ae79b8817bd3aa50fada0d1;p=quassel.git diff --git a/src/main/monoapplication.cpp b/src/main/monoapplication.cpp index 068ec711..f6dc5221 100644 --- a/src/main/monoapplication.cpp +++ b/src/main/monoapplication.cpp @@ -38,7 +38,7 @@ void MonolithicApplication::init() { QtUiApplication::init(); - connect(Client::coreConnection(), SIGNAL(connectToInternalCore(QPointer)), this, SLOT(onConnectionRequest(QPointer))); + connect(Client::coreConnection(), &CoreConnection::connectToInternalCore, this, &MonolithicApplication::onConnectionRequest); // If port is set, start internal core directly so external clients can connect // This is useful in case the mono client re-gains remote connection capability, @@ -53,7 +53,7 @@ Quassel::QuitHandler MonolithicApplication::quitHandler() { return [this]() { quInfo() << "Client shutting down..."; - connect(_client.get(), SIGNAL(destroyed()), this, SLOT(onClientDestroyed())); + connect(_client.get(), &QObject::destroyed, this, &MonolithicApplication::onClientDestroyed); _client.release()->deleteLater(); }; } @@ -62,7 +62,7 @@ Quassel::QuitHandler MonolithicApplication::quitHandler() void MonolithicApplication::onClientDestroyed() { if (_core) { - connect(_core, SIGNAL(shutdownComplete()), this, SLOT(onCoreShutdown())); + connect(_core, &Core::shutdownComplete, this, &MonolithicApplication::onCoreShutdown); _core->shutdown(); } else { @@ -74,7 +74,7 @@ void MonolithicApplication::onClientDestroyed() void MonolithicApplication::onCoreShutdown() { if (_core) { - connect(_core, SIGNAL(destroyed()), QCoreApplication::instance(), SLOT(quit())); + connect(_core, &QObject::destroyed, QCoreApplication::instance(), &QCoreApplication::quit); _coreThread.quit(); _coreThread.wait(); } @@ -94,14 +94,14 @@ void MonolithicApplication::startInternalCore() // Start internal core in a separate thread, so it doesn't block the UI _core = new Core{}; _core->moveToThread(&_coreThread); - connect(&_coreThread, SIGNAL(started()), _core, SLOT(initAsync())); - connect(&_coreThread, SIGNAL(finished()), _core, SLOT(deleteLater())); + connect(&_coreThread, &QThread::started, _core.data(), &Core::initAsync); + connect(&_coreThread, &QThread::finished, _core.data(), &QObject::deleteLater); - connect(this, SIGNAL(connectInternalPeer(QPointer)), _core, SLOT(connectInternalPeer(QPointer))); - connect(_core, SIGNAL(sessionState(Protocol::SessionState)), Client::coreConnection(), SLOT(internalSessionStateReceived(Protocol::SessionState))); + connect(this, &MonolithicApplication::connectInternalPeer, _core, &Core::connectInternalPeer); + connect(_core, &Core::sessionStateReceived, Client::coreConnection(), &CoreConnection::internalSessionStateReceived); - connect(_core, SIGNAL(dbUpgradeInProgress(bool)), Client::instance(), SLOT(onDbUpgradeInProgress(bool))); - connect(_core, SIGNAL(exitRequested(int,QString)), Client::instance(), SLOT(onExitRequested(int,QString))); + connect(_core.data(), &Core::dbUpgradeInProgress, Client::instance(), &Client::onDbUpgradeInProgress); + connect(_core.data(), &Core::exitRequested, Client::instance(), &Client::onExitRequested); _coreThread.start(); }