mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 11:05:44 +08:00
refactor: Remove remaining parts of dynamic splashscreen messages
The splash screen was already refactored with bfc27f6 for better readability
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user