fix: improve QUrl construction

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu 2023-07-07 19:25:12 +02:00
parent 6fcdac0d36
commit 51e62761ee
No known key found for this signature in database
GPG Key ID: E13DFD4B47127951
2 changed files with 2 additions and 2 deletions

View File

@ -691,7 +691,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
// Meta URL
m_settings->registerSetting("MetaURLOverride", "");
QUrl metaUrl = m_settings->get("MetaURLOverride").toString();
QUrl metaUrl(m_settings->get("MetaURLOverride").toString());
// get rid of invalid meta urls
if (!metaUrl.isValid() || metaUrl.scheme() != "http" || metaUrl.scheme() != "https")

View File

@ -165,7 +165,7 @@ void APIPage::applySettings()
QString msaClientID = ui->msaClientID->text();
s->set("MSAClientIDOverride", msaClientID);
QUrl metaURL = ui->metaURL->text();
QUrl metaURL(ui->metaURL->text());
// Add required trailing slash
if (!metaURL.isEmpty() && !metaURL.path().endsWith('/'))
{