From a84e299e4587245a753eae85e274964cb599c58a Mon Sep 17 00:00:00 2001 From: Lars Toenning Date: Thu, 15 Feb 2024 21:07:03 +0100 Subject: [PATCH] refactor: Remove unused single application flag --- src/blackcore/application.cpp | 7 +------ src/blackcore/application.h | 4 ---- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/blackcore/application.cpp b/src/blackcore/application.cpp index 4f4f0fe4d..ec195efcf 100644 --- a/src/blackcore/application.cpp +++ b/src/blackcore/application.cpp @@ -264,11 +264,6 @@ namespace BlackCore return s; } - void CApplication::setSingleApplication(bool singleApplication) - { - m_singleApplication = singleApplication; - } - QString CApplication::getExecutableForApplication(CApplicationInfo::Application application) const { QString searchFor; @@ -1301,7 +1296,7 @@ namespace BlackCore return false; } - if (m_singleApplication && m_alreadyRunning && !this->skipSingleApplicationCheck()) + if (m_alreadyRunning && !this->skipSingleApplicationCheck()) { this->cmdLineErrorMessage("Program must only run once", "You cannot run two or more instances side-by-side."); return false; diff --git a/src/blackcore/application.h b/src/blackcore/application.h index 95d010fdc..867906649 100644 --- a/src/blackcore/application.h +++ b/src/blackcore/application.h @@ -152,9 +152,6 @@ namespace BlackCore //! Version, name beta and dev info const QString &getApplicationNameVersionDetailed() const; - //! Force single application (only one instance) - void setSingleApplication(bool singleApplication); - //! Executable names for the given applications QString getExecutableForApplication(BlackMisc::CApplicationInfo::Application application) const; @@ -620,7 +617,6 @@ namespace BlackCore QCommandLineOption m_cmdSkipSingleApp { "skipsa" }; //!< Skip test for single application bool m_parsed = false; //!< Parsing accomplished? bool m_started = false; //!< Started with success? - bool m_singleApplication = true; //!< Only one instance of that application bool m_alreadyRunning = false; //!< Application already running std::atomic_bool m_shutdown { false }; //!< Is being shutdown? std::atomic_bool m_incognito { false }; //!< Incognito mode?