aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 557d7efcec..ab381bfb5d 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2016 The Bitcoin Core developers
+// Copyright (c) 2011-2017 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -28,8 +28,8 @@
#include <init.h>
#include <rpc/server.h>
-#include <scheduler.h>
#include <ui_interface.h>
+#include <uint256.h>
#include <util.h>
#include <warnings.h>
@@ -81,6 +81,7 @@ Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
// Declare meta types used for QMetaObject::invokeMethod
Q_DECLARE_METATYPE(bool*)
Q_DECLARE_METATYPE(CAmount)
+Q_DECLARE_METATYPE(uint256)
static void InitMessage(const std::string &message)
{
@@ -193,8 +194,6 @@ Q_SIGNALS:
void runawayException(const QString &message);
private:
- boost::thread_group threadGroup;
- CScheduler scheduler;
/// Pass fatal exception message to UI thread
void handleRunawayException(const std::exception *e);
@@ -300,7 +299,7 @@ void BitcoinCore::initialize()
try
{
qDebug() << __func__ << ": Running initialization in thread";
- bool rv = AppInitMain(threadGroup, scheduler);
+ bool rv = AppInitMain();
Q_EMIT initializeResult(rv);
} catch (const std::exception& e) {
handleRunawayException(&e);
@@ -314,8 +313,7 @@ void BitcoinCore::shutdown()
try
{
qDebug() << __func__ << ": Running Shutdown in thread";
- Interrupt(threadGroup);
- threadGroup.join_all();
+ Interrupt();
Shutdown();
qDebug() << __func__ << ": Shutdown finished";
Q_EMIT shutdownResult();
@@ -392,7 +390,6 @@ void BitcoinApplication::createWindow(const NetworkStyle *networkStyle)
pollShutdownTimer = new QTimer(window);
connect(pollShutdownTimer, SIGNAL(timeout()), window, SLOT(detectShutdown()));
- pollShutdownTimer->start(200);
}
void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle)
@@ -519,14 +516,16 @@ void BitcoinApplication::initializeResult(bool success)
window, SLOT(message(QString,QString,unsigned int)));
QTimer::singleShot(100, paymentServer, SLOT(uiReady()));
#endif
+ pollShutdownTimer->start(200);
} else {
- quit(); // Exit main loop
+ Q_EMIT splashFinished(window); // Make sure splash screen doesn't stick around during shutdown
+ quit(); // Exit first main loop invocation
}
}
void BitcoinApplication::shutdownResult()
{
- quit(); // Exit main loop after shutdown finished
+ quit(); // Exit second main loop invocation after shutdown finished
}
void BitcoinApplication::handleRunawayException(const QString &message)