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.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 6a2781079c..497805f2bb 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -450,6 +450,16 @@ WId BitcoinApplication::getMainWinId() const
return window->winId();
}
+bool BitcoinApplication::event(QEvent* e)
+{
+ if (e->type() == QEvent::Quit) {
+ requestShutdown();
+ return true;
+ }
+
+ return QApplication::event(e);
+}
+
static void SetupUIArgs(ArgsManager& argsman)
{
argsman.AddArg("-choosedatadir", strprintf("Choose data directory on startup (default: %u)", DEFAULT_CHOOSE_DATADIR), ArgsManager::ALLOW_ANY, OptionsCategory::GUI);