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.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index d4a834acb6..8bcf187ae7 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -32,6 +32,8 @@
#include <QTranslator>
#include <QWeakPointer>
#include <QThread>
+#include <QVBoxLayout>
+#include <QLabel>
#if defined(QT_STATICPLUGIN)
#include <QtPlugin>
@@ -347,17 +349,34 @@ void BitcoinApplication::requestShutdown()
window->setClientModel(0);
window->removeAllWallets();
guiref.clear();
+
delete walletModel;
+
+ // Show a simple window indicating shutdown status
+ QWidget *shutdownWindow = new QWidget();
+ QVBoxLayout *layout = new QVBoxLayout();
+ layout->addWidget(new QLabel(
+ tr("Bitcoin Core is shutting down...\n") +
+ tr("Do not shut down the computer until this window disappears.")));
+ shutdownWindow->setLayout(layout);
+
+ // Center shutdown window at where main window was
+ const QPoint global = window->mapToGlobal(window->rect().center());
+ shutdownWindow->move(global.x() - shutdownWindow->width() / 2, global.y() - shutdownWindow->height() / 2);
+ shutdownWindow->show();
+
+ // Request shutdown from core thread
emit requestedShutdown();
}
void BitcoinApplication::initializeResult(int retval)
{
LogPrintf("Initialization result: %i\n", retval);
- /// Set exit result: 0 if successful, 1 if failure
+ // Set exit result: 0 if successful, 1 if failure
returnValue = retval ? 0 : 1;
if(retval)
{
+ // Miscellaneous initialization after core is initialized
optionsModel->Upgrade(); // Must be done after AppInit2
PaymentServer::LoadRootCAs();