Have Qt poll for shutdown requested, the QT way.

This commit is contained in:
Gavin Andresen
2013-03-23 18:14:12 -04:00
parent b31499ec72
commit 723035bb68
6 changed files with 23 additions and 11 deletions

View File

@@ -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);
}