mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Check on reader to avoid redundant error messages
This commit is contained in:
committed by
Mathew Sutcliffe
parent
6863bf2937
commit
a22631777d
@@ -301,7 +301,7 @@ namespace BlackCore
|
|||||||
// parse if needed, parsing contains its own error handling
|
// parse if needed, parsing contains its own error handling
|
||||||
if (!this->m_parsed)
|
if (!this->m_parsed)
|
||||||
{
|
{
|
||||||
bool s = this->parse();
|
const bool s = this->parse();
|
||||||
if (!s) { return false; }
|
if (!s) { return false; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -588,6 +588,12 @@ namespace BlackCore
|
|||||||
return this->m_accessManager.networkAccessible() == QNetworkAccessManager::Accessible;
|
return this->m_accessManager.networkAccessible() == QNetworkAccessManager::Accessible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CApplication::hasSetupReader() const
|
||||||
|
{
|
||||||
|
// m_startSetupReader set to false, if something wrong with parsing
|
||||||
|
return m_setupReader && m_startSetupReader;
|
||||||
|
}
|
||||||
|
|
||||||
void CApplication::exit(int retcode)
|
void CApplication::exit(int retcode)
|
||||||
{
|
{
|
||||||
if (instance())
|
if (instance())
|
||||||
|
|||||||
@@ -159,6 +159,9 @@ namespace BlackCore
|
|||||||
//! Network accessible?
|
//! Network accessible?
|
||||||
bool isNetworkAccessible() const;
|
bool isNetworkAccessible() const;
|
||||||
|
|
||||||
|
//! Setup reader?
|
||||||
|
bool hasSetupReader() const;
|
||||||
|
|
||||||
//! Setup already synchronized
|
//! Setup already synchronized
|
||||||
bool isSetupAvailable() const;
|
bool isSetupAvailable() const;
|
||||||
|
|
||||||
@@ -416,8 +419,7 @@ namespace BlackCore
|
|||||||
bool isSetOrTrue(const QCommandLineOption &option) const;
|
bool isSetOrTrue(const QCommandLineOption &option) const;
|
||||||
|
|
||||||
//! Severe issue during startup, most likely it does not make sense to continue
|
//! Severe issue during startup, most likely it does not make sense to continue
|
||||||
//! \note call this here if the parsing stage is over and reaction to a runtime issue
|
//! \note call this here if the parsing stage is over and reaction to a runtime issue is needed
|
||||||
//! is needed
|
|
||||||
void severeStartupProblem(const BlackMisc::CStatusMessage &message);
|
void severeStartupProblem(const BlackMisc::CStatusMessage &message);
|
||||||
|
|
||||||
//! Start the core facade
|
//! Start the core facade
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ int main(int argc, char *argv[])
|
|||||||
a.setSignalStartupAutomatically(false); // application will signal startup on its own
|
a.setSignalStartupAutomatically(false); // application will signal startup on its own
|
||||||
a.splashScreen(CIcons::swift256());
|
a.splashScreen(CIcons::swift256());
|
||||||
if (!a.parse()) { return EXIT_FAILURE; }
|
if (!a.parse()) { return EXIT_FAILURE; }
|
||||||
if (!a.start())
|
if (!a.hasSetupReader() || !a.start())
|
||||||
{
|
{
|
||||||
a.gracefulShutdown();
|
a.gracefulShutdown();
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|||||||
Reference in New Issue
Block a user