X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fmonoapplication.cpp;h=34890edc5bf1ed91720e504c9770c64bfe9ffb2d;hb=1ccf9666ade9a46880ffb68feeac81b7c39e570b;hp=c9695cc83f87d98659feda1a8bcf30cba94f99bb;hpb=72473527f99cbe68dcfcb4ca17f828bd3775bba7;p=quassel.git diff --git a/src/qtui/monoapplication.cpp b/src/qtui/monoapplication.cpp index c9695cc8..34890edc 100644 --- a/src/qtui/monoapplication.cpp +++ b/src/qtui/monoapplication.cpp @@ -23,6 +23,7 @@ #include "client.h" #include "core.h" #include "internalpeer.h" +#include "logmessage.h" #include "qtui.h" class InternalPeer; @@ -30,10 +31,6 @@ class InternalPeer; MonolithicApplication::MonolithicApplication(int &argc, char **argv) : QtUiApplication(argc, argv) { -#if defined(HAVE_KDE4) || defined(Q_OS_MAC) - Quassel::disableCrashHandler(); -#endif /* HAVE_KDE4 || Q_OS_MAC */ - Quassel::setRunMode(Quassel::Monolithic); } @@ -56,6 +53,7 @@ void MonolithicApplication::init() Quassel::QuitHandler MonolithicApplication::quitHandler() { return [this]() { + quInfo() << "Client shutting down..."; connect(_client.get(), SIGNAL(destroyed()), this, SLOT(onClientDestroyed())); _client.release()->deleteLater(); }; @@ -63,6 +61,18 @@ Quassel::QuitHandler MonolithicApplication::quitHandler() void MonolithicApplication::onClientDestroyed() +{ + if (_core) { + connect(_core, SIGNAL(shutdownComplete()), this, SLOT(onCoreShutdown())); + _core->shutdown(); + } + else { + QCoreApplication::quit(); + } +} + + +void MonolithicApplication::onCoreShutdown() { if (_core) { connect(_core, SIGNAL(destroyed()), QCoreApplication::instance(), SLOT(quit()));