diff --git a/src/blackcore/application.cpp b/src/blackcore/application.cpp index 8d8c69fb1..708c0c7be 100644 --- a/src/blackcore/application.cpp +++ b/src/blackcore/application.cpp @@ -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()) diff --git a/src/blackcore/application.h b/src/blackcore/application.h index a182aad9b..2724dd496 100644 --- a/src/blackcore/application.h +++ b/src/blackcore/application.h @@ -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 diff --git a/src/swiftguistandard/main.cpp b/src/swiftguistandard/main.cpp index 5edf40219..70425faa8 100644 --- a/src/swiftguistandard/main.cpp +++ b/src/swiftguistandard/main.cpp @@ -29,7 +29,7 @@ int main(int argc, char *argv[]) a.setSignalStartupAutomatically(false); // application will signal startup on its own a.splashScreen(CIcons::swift256()); if (!a.parse()) { return EXIT_FAILURE; } - if (!a.start()) + if (!a.hasSetupReader() || !a.start()) { a.gracefulShutdown(); return EXIT_FAILURE;