aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-02-17 15:29:09 +0100
committerSefa Eyeoglu <contact@scrumplex.net>2022-02-17 15:29:09 +0100
commit6b4469c6cce517dabe967c12b30648e0c41f12d5 (patch)
treee4c6e2cf96848c9d81217862c47bb21e40c90fc9 /launcher
parent037b0d71902667dcacf737a17741b39cbb399a56 (diff)
downloadPrismLauncher-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.cpp14
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;
}