diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2013-03-23 18:14:12 -0400 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-04-03 19:58:47 -0400 |
commit | 723035bb6839c5d65bfee96d501a8c54814778e3 (patch) | |
tree | d0d80686edc2c25446fcb0a67d68c8c12722f935 /src/qt/bitcoingui.cpp | |
parent | b31499ec72edd1554d4612d1b54808fce0360e14 (diff) |
Have Qt poll for shutdown requested, the QT way.
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r-- | src/qt/bitcoingui.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index adc6cd4742..9da5b85006 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -24,6 +24,7 @@ #include "rpcconsole.h" #include "ui_interface.h" #include "wallet.h" +#include "init.h" #ifdef Q_OS_MAC #include "macdockiconhandler.h" @@ -839,3 +840,9 @@ void BitcoinGUI::toggleHidden() { showNormalIfMinimized(true); } + +void BitcoinGUI::detectShutdown() +{ + if (ShutdownRequested()) + QMetaObject::invokeMethod(QCoreApplication::instance(), "quit", Qt::QueuedConnection); +} |