refactor: Remove shortcuts to start launcher

This commit is contained in:
Lars Toenning
2024-12-28 20:12:06 +01:00
parent 88ec24bfb4
commit aecc71067c
4 changed files with 0 additions and 64 deletions

View File

@@ -257,47 +257,6 @@ namespace swift::core
return s;
}
QString CApplication::getExecutableForApplication(CApplicationInfo::Application application) const
{
QString searchFor;
switch (application)
{
case CApplicationInfo::PilotClientCore: searchFor = "core"; break;
case CApplicationInfo::Launcher: searchFor = "launcher"; break;
case CApplicationInfo::MappingTool: searchFor = "data"; break;
case CApplicationInfo::PilotClientGui: searchFor = "gui"; break;
default: break;
}
if (searchFor.isEmpty()) { return {}; }
for (const QString &executable : CFileUtils::getSwiftExecutables())
{
if (!executable.contains("swift", Qt::CaseInsensitive)) { continue; }
if (executable.contains(searchFor, Qt::CaseInsensitive)) { return executable; }
}
return {};
}
bool CApplication::startLauncher()
{
static const QString launcher =
CApplication::getExecutableForApplication(CApplicationInfo::Application::Launcher);
if (launcher.isEmpty() || CApplication::isApplicationRunning(CApplicationInfo::Launcher)) { return false; }
// const QStringList args = this->argumentsJoined({}, { "--dbus", "--core", "--coreaudio" });
const QStringList args = this->argumentsJoined({}, { "--dbus", "--core" });
return QProcess::startDetached(launcher, args);
}
bool CApplication::startLauncherAndQuit()
{
const bool started = CApplication::startLauncher();
if (!started) { return false; }
this->gracefulShutdown();
CApplication::exit();
return true;
}
CGlobalSetup CApplication::getGlobalSetup() const
{
if (m_shutdown) { return CGlobalSetup(); }