mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 13:35:34 +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();
|
||||
|
||||
Reference in New Issue
Block a user