From 11063651803a897674eaefc99e829feca1b359e9 Mon Sep 17 00:00:00 2001 From: Lars Toenning Date: Wed, 14 Feb 2024 20:53:26 +0100 Subject: [PATCH] refactor: Remove remaining parts of dynamic splashscreen messages The splash screen was already refactored with bfc27f6 for better readability --- src/blackgui/guiapplication.cpp | 47 --------------------------------- src/blackgui/guiapplication.h | 12 --------- 2 files changed, 59 deletions(-) diff --git a/src/blackgui/guiapplication.cpp b/src/blackgui/guiapplication.cpp index d877bd7d4..cd049bdd5 100644 --- a/src/blackgui/guiapplication.cpp +++ b/src/blackgui/guiapplication.cpp @@ -122,9 +122,6 @@ namespace BlackGui // notify when app goes down connect(qGuiApp, &QGuiApplication::lastWindowClosed, this, &CGuiApplication::gracefulShutdown); - // follow up on web data services - connect(this, &CApplication::webDataServicesStarted, this, &CGuiApplication::onWebDataServicesStarted); - if (!sGui) { CGuiApplication::registerMetadata(); @@ -197,19 +194,6 @@ namespace BlackGui } } - void CGuiApplication::splashScreen(const QString &resource) - { - if (m_splashScreen) - { - m_splashScreen.reset(); // delete old one - } - if (!resource.isEmpty()) - { - const QPixmap pm(resource); - this->splashScreen(pm); - } - } - void CGuiApplication::splashScreen(const QPixmap &pixmap) { if (m_splashScreen) @@ -227,29 +211,6 @@ namespace BlackGui m_splashScreen->show(); m_splashScreen->showStatusMessage("Version " + CBuildConfig::getVersionString()); m_splashScreen->setSplashFont(splashFont); - - this->processEventsToRefreshGui(); - } - - void CGuiApplication::displaySplashMessage(const CStatusMessage &msg) - { - if (msg.isEmpty()) { return; } - if (!m_splashScreen) { return; } - if (this->isShuttingDown()) { return; } - if (!m_splashScreen->isVisible()) { return; } - m_splashScreen->showStatusMessage(msg); - } - - void CGuiApplication::displaySplashMessages(const CStatusMessageList &msgs) - { - if (msgs.isEmpty()) { return; } - for (const CStatusMessage &m : msgs) - { - if (!m_splashScreen) { return; } - this->displaySplashMessage(m); - this->processEventsToRefreshGui(); - if (!sGui) { return; } - } } void CGuiApplication::processEventsToRefreshGui() const @@ -1401,14 +1362,6 @@ namespace BlackGui m_fontPointSize = font.pointSize(); } - void CGuiApplication::onWebDataServicesStarted(bool success) - { - if (success) - { - connect(this->getWebDataServices(), &CWebDataServices::databaseReaderMessages, this, &CGuiApplication::displaySplashMessages, Qt::QueuedConnection); - } - } - void CGuiApplication::superviseWindowMinSizes() { CGuiUtility::superviseMainWindowMinSizes(); diff --git a/src/blackgui/guiapplication.h b/src/blackgui/guiapplication.h index f1594da66..52fbb3638 100644 --- a/src/blackgui/guiapplication.h +++ b/src/blackgui/guiapplication.h @@ -142,18 +142,9 @@ namespace BlackGui //! @} // -------- Splash screen related --------- - //! Add a splash screen based on resource, empty means remove splash screen - void splashScreen(const QString &resource); - //! Add a splash screen based on resource, empty means remove splash screen void splashScreen(const QPixmap &pixmap); - //! @{ - //! Display splash screen messages if screen is available and visible - void displaySplashMessage(const BlackMisc::CStatusMessage &msg); - void displaySplashMessages(const BlackMisc::CStatusMessageList &msgs); - //! @} - // -------- Splash screen related --------- //! Add menu items for settings and cache @@ -381,9 +372,6 @@ namespace BlackGui //! Set current font values void setCurrentFontValues(); - //! Web data services started - void onWebDataServicesStarted(bool success); - //! \copydoc BlackGui::CGuiUtility::superviseMainWindowMinSizes void superviseWindowMinSizes();