X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fmonoapplication.cpp;h=e92afcc68bc36fc07417563141752b929585dfd2;hb=03f61d2ab68356bd74f6f014651c823e79678cbd;hp=d880f33f07e3d7e228bf000afaf711628f563549;hpb=dc11e24b95e5b5e3595cc0e98eb2a572006912c7;p=quassel.git diff --git a/src/qtui/monoapplication.cpp b/src/qtui/monoapplication.cpp index d880f33f..e92afcc6 100644 --- a/src/qtui/monoapplication.cpp +++ b/src/qtui/monoapplication.cpp @@ -38,10 +38,9 @@ MonolithicApplication::MonolithicApplication(int &argc, char **argv) } -bool MonolithicApplication::init() +void MonolithicApplication::init() { - if (!QtUiApplication::init()) - return false; + QtUiApplication::init(); connect(Client::coreConnection(), SIGNAL(connectToInternalCore(QPointer)), this, SLOT(onConnectionRequest(QPointer))); @@ -51,8 +50,6 @@ bool MonolithicApplication::init() if (Quassel::isOptionSet("port")) { startInternalCore(); } - - return true; } @@ -76,13 +73,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(init())); + connect(&_coreThread, SIGNAL(started()), _core, SLOT(initAsync())); connect(&_coreThread, SIGNAL(finished()), _core, SLOT(deleteLater())); connect(this, SIGNAL(connectInternalPeer(QPointer)), _core, SLOT(connectInternalPeer(QPointer))); connect(_core, SIGNAL(sessionState(Protocol::SessionState)), Client::coreConnection(), SLOT(internalSessionStateReceived(Protocol::SessionState))); connect(_core, SIGNAL(dbUpgradeInProgress(bool)), Client::instance(), SLOT(onDbUpgradeInProgress(bool))); + connect(_core, SIGNAL(exitRequested(int,QString)), Client::instance(), SLOT(onExitRequested(int,QString))); _coreThread.start(); }