aboutsummaryrefslogtreecommitdiff
path: root/launcher/Application.cpp
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-07-13 20:05:16 -0700
committerGitHub <noreply@github.com>2023-07-13 20:05:16 -0700
commit520594e5296b09205e55bc018b1f759df5725e96 (patch)
tree07e334684062151c5fdf699e805d9326255a3dc3 /launcher/Application.cpp
parent8d7dcdfc5b2a231a1304878e25929e6f4ff4e338 (diff)
parent94d4d12ee0a12572b2b661003f10cfbdda1b434a (diff)
downloadPrismLauncher-520594e5296b09205e55bc018b1f759df5725e96.tar.gz
PrismLauncher-520594e5296b09205e55bc018b1f759df5725e96.tar.bz2
PrismLauncher-520594e5296b09205e55bc018b1f759df5725e96.zip
Merge branch 'develop' into chore/add-compiler-warnings
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/Application.cpp')
-rw-r--r--launcher/Application.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 1d97a5f2..5aa9efc4 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -568,6 +568,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
// Language
m_settings->registerSetting("Language", QString());
+ m_settings->registerSetting("UseSystemLocale", false);
// Console
m_settings->registerSetting("ShowConsole", false);
@@ -687,8 +688,16 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
m_settings->reset("PastebinCustomAPIBase");
}
}
- // meta URL
- m_settings->registerSetting("MetaURLOverride", "");
+ {
+ // Meta URL
+ m_settings->registerSetting("MetaURLOverride", "");
+
+ QUrl metaUrl(m_settings->get("MetaURLOverride").toString());
+
+ // get rid of invalid meta urls
+ if (!metaUrl.isValid() || metaUrl.scheme() != "http" || metaUrl.scheme() != "https")
+ m_settings->reset("MetaURLOverride");
+ }
m_settings->registerSetting("CloseAfterLaunch", false);
m_settings->registerSetting("QuitAfterGameStop", false);
@@ -910,12 +919,7 @@ bool Application::createSetupWizard()
}
return false;
}();
- bool languageRequired = [&]()
- {
- if (settings()->get("Language").toString().isEmpty())
- return true;
- return false;
- }();
+ bool languageRequired = settings()->get("Language").toString().isEmpty();
bool pasteInterventionRequired = settings()->get("PastebinURL") != "";
bool themeInterventionRequired = settings()->get("ApplicationTheme") == "";
bool wizardRequired = javaRequired || languageRequired || pasteInterventionRequired || themeInterventionRequired;