Check on reader to avoid redundant error messages

This commit is contained in:
Klaus Basan
2017-04-02 23:07:07 +02:00
committed by Mathew Sutcliffe
parent 6863bf2937
commit a22631777d
3 changed files with 12 additions and 4 deletions

View File

@@ -301,7 +301,7 @@ namespace BlackCore
// parse if needed, parsing contains its own error handling
if (!this->m_parsed)
{
bool s = this->parse();
const bool s = this->parse();
if (!s) { return false; }
}
@@ -588,6 +588,12 @@ namespace BlackCore
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)
{
if (instance())

View File

@@ -159,6 +159,9 @@ namespace BlackCore
//! Network accessible?
bool isNetworkAccessible() const;
//! Setup reader?
bool hasSetupReader() const;
//! Setup already synchronized
bool isSetupAvailable() const;
@@ -416,8 +419,7 @@ namespace BlackCore
bool isSetOrTrue(const QCommandLineOption &option) const;
//! 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
//! is needed
//! \note call this here if the parsing stage is over and reaction to a runtime issue is needed
void severeStartupProblem(const BlackMisc::CStatusMessage &message);
//! Start the core facade