projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
core: Avoid Clang warning for inconsistent override
[quassel.git]
/
src
/
qtui
/
monoapplication.cpp
diff --git
a/src/qtui/monoapplication.cpp
b/src/qtui/monoapplication.cpp
index
c9695cc
..
34890ed
100644
(file)
--- a/
src/qtui/monoapplication.cpp
+++ b/
src/qtui/monoapplication.cpp
@@
-23,6
+23,7
@@
#include "client.h"
#include "core.h"
#include "internalpeer.h"
#include "client.h"
#include "core.h"
#include "internalpeer.h"
+#include "logmessage.h"
#include "qtui.h"
class InternalPeer;
#include "qtui.h"
class InternalPeer;
@@
-30,10
+31,6
@@
class InternalPeer;
MonolithicApplication::MonolithicApplication(int &argc, char **argv)
: QtUiApplication(argc, argv)
{
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);
}
Quassel::setRunMode(Quassel::Monolithic);
}
@@
-56,6
+53,7
@@
void MonolithicApplication::init()
Quassel::QuitHandler MonolithicApplication::quitHandler()
{
return [this]() {
Quassel::QuitHandler MonolithicApplication::quitHandler()
{
return [this]() {
+ quInfo() << "Client shutting down...";
connect(_client.get(), SIGNAL(destroyed()), this, SLOT(onClientDestroyed()));
_client.release()->deleteLater();
};
connect(_client.get(), SIGNAL(destroyed()), this, SLOT(onClientDestroyed()));
_client.release()->deleteLater();
};
@@
-63,6
+61,18
@@
Quassel::QuitHandler MonolithicApplication::quitHandler()
void MonolithicApplication::onClientDestroyed()
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()));
{
if (_core) {
connect(_core, SIGNAL(destroyed()), QCoreApplication::instance(), SLOT(quit()));