diff options
author | seth <getchoo@tuta.io> | 2023-07-07 14:31:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-07 14:31:22 -0400 |
commit | d1528c10440f424117e487f4a6e692c3e3a4277e (patch) | |
tree | f035df2cb9f6bc37e1bfba664b07578799bf4c5b /launcher/ui | |
parent | e225a721807b00297a5733e9d60fe2b5603de77c (diff) | |
parent | 51e62761ee8e8cd868c5f2a7eb63d54de5b71d6a (diff) | |
download | PrismLauncher-d1528c10440f424117e487f4a6e692c3e3a4277e.tar.gz PrismLauncher-d1528c10440f424117e487f4a6e692c3e3a4277e.tar.bz2 PrismLauncher-d1528c10440f424117e487f4a6e692c3e3a4277e.zip |
Merge pull request #1325 from Scrumplex/validate-meta-url
Validate Meta URL
Diffstat (limited to 'launcher/ui')
-rw-r--r-- | launcher/ui/pages/global/APIPage.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/launcher/ui/pages/global/APIPage.cpp b/launcher/ui/pages/global/APIPage.cpp index dca1b3a6..668aa007 100644 --- a/launcher/ui/pages/global/APIPage.cpp +++ b/launcher/ui/pages/global/APIPage.cpp @@ -81,6 +81,8 @@ APIPage::APIPage(QWidget *parent) : connect(ui->pasteTypeComboBox, currentIndexChangedSignal, this, &APIPage::updateBaseURLPlaceholder); // This function needs to be called even when the ComboBox's index is still in its default state. updateBaseURLPlaceholder(ui->pasteTypeComboBox->currentIndex()); + // NOTE: this allows http://, but we replace that with https later anyway + ui->metaURL->setValidator(new QRegularExpressionValidator(validUrlRegExp, ui->metaURL)); ui->baseURLEntry->setValidator(new QRegularExpressionValidator(validUrlRegExp, ui->baseURLEntry)); ui->msaClientID->setValidator(new QRegularExpressionValidator(validMSAClientID, ui->msaClientID)); ui->flameKey->setValidator(new QRegularExpressionValidator(validFlameKey, ui->flameKey)); @@ -163,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('/')) { |