refactor: Remove unused single application flag

This commit is contained in:
Lars Toenning
2024-02-15 21:07:03 +01:00
parent de45811d34
commit a84e299e45
2 changed files with 1 additions and 10 deletions

View File

@@ -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;

View File

@@ -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?