fix: reset invalid meta url on launch

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu 2023-07-07 15:57:24 +02:00
parent 073cb91f88
commit 6fcdac0d36
No known key found for this signature in database
GPG Key ID: E13DFD4B47127951

View File

@ -687,8 +687,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);