aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-09-22 10:08:47 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-09-22 10:13:52 +0200
commitcfc5cfb0f0d074774b17adcb88aaed11e6847c92 (patch)
treee2e45db192bc450888caadb3ab2241f10404f30c /src/qt/bitcoin.cpp
parent6b09bc45b12465dc8511f1e84791e3b4db5400b8 (diff)
qt: Make splash and shutdown window ignore close events
It's strange to be able to close these windows while there is work in progress. Also set Qt::WA_DeleteOnClose on both windows to make sure that they are deleted eventually, no matter what happens.
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 676f218f20..fd629ccd2c 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -339,6 +339,9 @@ void BitcoinApplication::createWindow(bool isaTestNet)
void BitcoinApplication::createSplashScreen(bool isaTestNet)
{
SplashScreen *splash = new SplashScreen(0, isaTestNet);
+ // We don't hold a direct pointer to the splash screen after creation, so use
+ // Qt::WA_DeleteOnClose to make sure that the window will be deleted eventually.
+ splash->setAttribute(Qt::WA_DeleteOnClose);
splash->show();
connect(this, SIGNAL(splashFinished(QWidget*)), splash, SLOT(slotFinish(QWidget*)));
}