diff --git a/src/qt/bitcoin.h b/src/qt/bitcoin.h --- a/src/qt/bitcoin.h +++ b/src/qt/bitcoin.h @@ -106,7 +106,7 @@ HTTPRPCRequestProcessor *httpRPCRequestProcessor); void requestedShutdown(); void stopThread(); - void splashFinished(QWidget *window); + void splashFinished(); void windowShown(BitcoinGUI *window); private: diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -244,11 +244,11 @@ void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle) { SplashScreen *splash = new SplashScreen(m_node, networkStyle); // We don't hold a direct pointer to the splash screen after creation, but - // the splash screen will take care of deleting itself when slotFinish + // the splash screen will take care of deleting itself when finish() // happens. splash->show(); connect(this, &BitcoinApplication::splashFinished, splash, - &SplashScreen::slotFinish); + &SplashScreen::finish); connect(this, &BitcoinApplication::requestedShutdown, splash, &QWidget::close); } @@ -351,7 +351,7 @@ returnValue = success ? EXIT_SUCCESS : EXIT_FAILURE; if (!success) { // Make sure splash screen doesn't stick around during shutdown. - Q_EMIT splashFinished(window); + Q_EMIT splashFinished(); // Exit first main loop invocation. quit(); return; @@ -386,7 +386,7 @@ } else { window->show(); } - Q_EMIT splashFinished(window); + Q_EMIT splashFinished(); Q_EMIT windowShown(window); #ifdef ENABLE_WALLET diff --git a/src/qt/splashscreen.h b/src/qt/splashscreen.h --- a/src/qt/splashscreen.h +++ b/src/qt/splashscreen.h @@ -5,8 +5,7 @@ #ifndef BITCOIN_QT_SPLASHSCREEN_H #define BITCOIN_QT_SPLASHSCREEN_H -#include -#include +#include #include @@ -37,8 +36,9 @@ void closeEvent(QCloseEvent *event) override; public Q_SLOTS: - /** Slot to call finish() method as it's not defined as slot */ - void slotFinish(QWidget *mainWin); + /** Hide the splash screen window and schedule the splash screen object for + * deletion */ + void finish(); /** Show message and progress */ void showMessage(const QString &message, int alignment, diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp --- a/src/qt/splashscreen.cpp +++ b/src/qt/splashscreen.cpp @@ -159,9 +159,7 @@ return QObject::eventFilter(obj, ev); } -void SplashScreen::slotFinish(QWidget *mainWin) { - Q_UNUSED(mainWin); - +void SplashScreen::finish() { /* If the window is minimized, hide() will be ignored. */ /* Make sure we de-minimize the splashscreen window before hiding */ if (isMinimized()) {