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.
This commit is contained in:
Wladimir J. van der Laan
2014-09-22 10:08:47 +02:00
parent 6b09bc45b1
commit cfc5cfb0f0
5 changed files with 42 additions and 11 deletions

View File

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