diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-02-17 15:29:09 +0100 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-02-17 15:29:09 +0100 |
commit | 6b4469c6cce517dabe967c12b30648e0c41f12d5 (patch) | |
tree | e4c6e2cf96848c9d81217862c47bb21e40c90fc9 /launcher | |
parent | 037b0d71902667dcacf737a17741b39cbb399a56 (diff) | |
download | PrismLauncher-6b4469c6cce517dabe967c12b30648e0c41f12d5.tar.gz PrismLauncher-6b4469c6cce517dabe967c12b30648e0c41f12d5.tar.bz2 PrismLauncher-6b4469c6cce517dabe967c12b30648e0c41f12d5.zip |
fix: combine errors if --launch is missing
Diffstat (limited to 'launcher')
-rw-r--r-- | launcher/Application.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp index 2165dd2e..e916dcf7 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -292,18 +292,10 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) m_liveCheck = args["alive"].toBool(); m_zipToImport = args["import"].toUrl(); - // error if --launch is missing with --server - if(m_instanceIdToLaunch.isEmpty() && !m_serverToJoin.isEmpty()) + // error if --launch is missing with --server or --profile + if((!m_serverToJoin.isEmpty() || !m_profileToUse.isEmpty()) && m_instanceIdToLaunch.isEmpty()) { - std::cerr << "--server can only be used in combination with --launch!" << std::endl; - m_status = Application::Failed; - return; - } - - // error if --launch is missing with --account - if(m_instanceIdToLaunch.isEmpty() && !m_profileToUse.isEmpty()) - { - std::cerr << "--account can only be used in combination with --launch!" << std::endl; + std::cerr << "--server and --profile can only be used in combination with --launch!" << std::endl; m_status = Application::Failed; return; } |