mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Splash screen messages for web data services
This commit is contained in:
committed by
Mat Sutcliffe
parent
8c3faa4ca9
commit
400a8fc2a8
@@ -250,6 +250,7 @@ namespace BlackCore
|
|||||||
m1 = CStatusMessage(this, CStatusMessage::SeverityError, "First bootstrap URL is empty");
|
m1 = CStatusMessage(this, CStatusMessage::SeverityError, "First bootstrap URL is empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
emit this->setupLoadingMessages(m1);
|
||||||
|
|
||||||
url = randomUrls.back();
|
url = randomUrls.back();
|
||||||
if (!url.isEmpty())
|
if (!url.isEmpty())
|
||||||
|
|||||||
@@ -1430,10 +1430,11 @@ namespace BlackCore
|
|||||||
if (timeOut.isValid() && QDateTime::currentDateTimeUtc() > timeOut)
|
if (timeOut.isValid() && QDateTime::currentDateTimeUtc() > timeOut)
|
||||||
{
|
{
|
||||||
const QString timeOutString = timeOut.toString();
|
const QString timeOutString = timeOut.toString();
|
||||||
CLogMessage(this).warning(u"Could not read '%1' info objects for '%2' from '%3', time out '%4'. Marking reader '%5' as failed and continue.")
|
const CStatusMessage m = CLogMessage(this).warning(u"Could not read '%1' info objects for '%2' from '%3', time out '%4'. Marking reader '%5' as failed and continue.")
|
||||||
<< info << CEntityFlags::flagToString(entities)
|
<< info << CEntityFlags::flagToString(entities)
|
||||||
<< infoReader->getInfoObjectsUrl().toQString() << timeOutString
|
<< infoReader->getInfoObjectsUrl().toQString() << timeOutString
|
||||||
<< infoReader->getName();
|
<< infoReader->getName();
|
||||||
|
emit this->databaseReaderMessages(m);
|
||||||
|
|
||||||
// continue here and read data without info objects
|
// continue here and read data without info objects
|
||||||
infoReader->setMarkedAsFailed(true);
|
infoReader->setMarkedAsFailed(true);
|
||||||
@@ -1448,15 +1449,17 @@ namespace BlackCore
|
|||||||
{
|
{
|
||||||
// ok, this means we are parsing
|
// ok, this means we are parsing
|
||||||
this->readDeferredInBackground(entities, waitForInfoObjectsMs);
|
this->readDeferredInBackground(entities, waitForInfoObjectsMs);
|
||||||
CLogMessage(this).info(u"Parsing objects (%1) for '%2' from '%3'") << info << CEntityFlags::flagToString(entities) << infoReader->getInfoObjectsUrl().toQString();
|
const CStatusMessage m = CLogMessage(this).info(u"Parsing objects (%1) for '%2' from '%3'") << info << CEntityFlags::flagToString(entities) << infoReader->getInfoObjectsUrl().toQString();
|
||||||
|
emit this->databaseReaderMessages(m);
|
||||||
return false; // wait
|
return false; // wait
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// we have a response, but a failure, means server is alive, but responded with error
|
// we have a response, but a failure, means server is alive, but responded with error
|
||||||
// such an error (access, ...) normally will not go away
|
// such an error (access, ...) normally will not go away
|
||||||
CLogMessage(this).error(u"Info objects (%1) loading for '%2' failed from '%3', '%4'") << info << CEntityFlags::flagToString(entities) << infoReader->getInfoObjectsUrl().toQString() << infoReader->getStatusMessage();
|
const CStatusMessage m = CLogMessage(this).error(u"Info objects (%1) loading for '%2' failed from '%3', '%4'") << info << CEntityFlags::flagToString(entities) << infoReader->getInfoObjectsUrl().toQString() << infoReader->getStatusMessage();
|
||||||
infoReader->setMarkedAsFailed(true);
|
infoReader->setMarkedAsFailed(true);
|
||||||
|
emit this->databaseReaderMessages(m);
|
||||||
return true; // carry on, regardless of situation
|
return true; // carry on, regardless of situation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,6 +96,9 @@ namespace BlackGui
|
|||||||
// notify when app goes down
|
// notify when app goes down
|
||||||
connect(qGuiApp, &QGuiApplication::lastWindowClosed, this, &CGuiApplication::gracefulShutdown);
|
connect(qGuiApp, &QGuiApplication::lastWindowClosed, this, &CGuiApplication::gracefulShutdown);
|
||||||
|
|
||||||
|
// follow up on web data services
|
||||||
|
connect(this, &CApplication::webDataServicesStarted, this, &CGuiApplication::onWebDataServicesStarted);
|
||||||
|
|
||||||
if (!sGui)
|
if (!sGui)
|
||||||
{
|
{
|
||||||
CGuiApplication::registerMetadata();
|
CGuiApplication::registerMetadata();
|
||||||
@@ -109,6 +112,8 @@ namespace BlackGui
|
|||||||
|
|
||||||
connect(&m_styleSheetUtility, &CStyleSheetUtility::styleSheetsChanged, this, &CGuiApplication::onStyleSheetsChanged, Qt::QueuedConnection);
|
connect(&m_styleSheetUtility, &CStyleSheetUtility::styleSheetsChanged, this, &CGuiApplication::onStyleSheetsChanged, Qt::QueuedConnection);
|
||||||
connect(this, &CGuiApplication::startUpCompleted, this, &CGuiApplication::superviseWindowMinSizes, Qt::QueuedConnection);
|
connect(this, &CGuiApplication::startUpCompleted, this, &CGuiApplication::superviseWindowMinSizes, Qt::QueuedConnection);
|
||||||
|
|
||||||
|
// splash screen
|
||||||
connect(this->getSetupReader(), &CSetupReader::setupLoadingMessages, this, &CGuiApplication::displaySplashMessages, Qt::QueuedConnection);
|
connect(this->getSetupReader(), &CSetupReader::setupLoadingMessages, this, &CGuiApplication::displaySplashMessages, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1112,6 +1117,14 @@ namespace BlackGui
|
|||||||
m_fontPointSize = font.pointSize();
|
m_fontPointSize = font.pointSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CGuiApplication::onWebDataServicesStarted(bool success)
|
||||||
|
{
|
||||||
|
if (success)
|
||||||
|
{
|
||||||
|
connect(this->getWebDataServices(), &CWebDataServices::databaseReaderMessages, this, &CGuiApplication::displaySplashMessages, Qt::QueuedConnection);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CGuiApplication::superviseWindowMinSizes()
|
void CGuiApplication::superviseWindowMinSizes()
|
||||||
{
|
{
|
||||||
CGuiUtility::superviseMainWindowMinSizes();
|
CGuiUtility::superviseMainWindowMinSizes();
|
||||||
|
|||||||
@@ -344,6 +344,9 @@ namespace BlackGui
|
|||||||
//! Set current font values
|
//! Set current font values
|
||||||
void setCurrentFontValues();
|
void setCurrentFontValues();
|
||||||
|
|
||||||
|
//! Web data services started
|
||||||
|
void onWebDataServicesStarted(bool success);
|
||||||
|
|
||||||
//! \copydoc BlackGui::CGuiUtility::superviseMainWindowMinSizes
|
//! \copydoc BlackGui::CGuiUtility::superviseMainWindowMinSizes
|
||||||
void superviseWindowMinSizes();
|
void superviseWindowMinSizes();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user