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:
@@ -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*)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user