diff --git a/src/core/application.cpp b/src/core/application.cpp index 1ff279562..b922518bc 100644 --- a/src/core/application.cpp +++ b/src/core/application.cpp @@ -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(); } diff --git a/src/core/application.h b/src/core/application.h index d067045c3..6034e0872 100644 --- a/src/core/application.h +++ b/src/core/application.h @@ -146,15 +146,6 @@ namespace swift::core //! Version, name beta and dev info const QString &getApplicationNameVersionDetailed() const; - //! Executable names for the given applications - QString getExecutableForApplication(swift::misc::CApplicationInfo::Application application) const; - - //! Start the launcher - bool startLauncher(); - - //! Start the launcher and quit - bool startLauncherAndQuit(); - //! Global setup //! \threadsafe data::CGlobalSetup getGlobalSetup() const; diff --git a/src/gui/components/navigatordialog.cpp b/src/gui/components/navigatordialog.cpp index 2536c9425..e7236afa8 100644 --- a/src/gui/components/navigatordialog.cpp +++ b/src/gui/components/navigatordialog.cpp @@ -296,13 +296,6 @@ namespace swift::gui::components // add some space for frameless navigators where I can move the navigator QAction *a = nullptr; // new QAction(CIcons::empty16(), "move navigator here", this); bool c = false; - if (sGui) - { - a = new QAction(CIcons::swiftLauncher16(), "Start launcher", this); - c = connect(a, &QAction::triggered, sGui, &CGuiApplication::startLauncher); - Q_ASSERT(c); - this->addAction(a); - } // save a = new QAction(CIcons::save16(), "Save state", this); diff --git a/src/gui/guiapplication.cpp b/src/gui/guiapplication.cpp index ede40c4c3..ee8f0b7de 100644 --- a/src/gui/guiapplication.cpp +++ b/src/gui/guiapplication.cpp @@ -664,13 +664,6 @@ namespace swift::gui addMenuForStyleSheets(menu); QAction *a = nullptr; bool c = false; - if (this->getApplicationInfo().getApplication() != CApplicationInfo::Launcher) - { - menu.addSeparator(); - a = menu.addAction(CIcons::swiftLauncher24(), "Start swift launcher"); - c = connect(a, &QAction::triggered, this, &CGuiApplication::startLauncher); - Q_ASSERT_X(c, Q_FUNC_INFO, "Connect failed"); - } menu.addSeparator(); a = menu.addAction("E&xit");