trim input from import page

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2024-06-30 00:17:25 +03:00
parent e6234b5086
commit 25bae20db4
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318

View File

@ -104,7 +104,7 @@ void ImportPage::updateState()
return; return;
} }
if (ui->modpackEdit->hasAcceptableInput()) { if (ui->modpackEdit->hasAcceptableInput()) {
QString input = ui->modpackEdit->text(); QString input = ui->modpackEdit->text().trimmed();
auto url = QUrl::fromUserInput(input); auto url = QUrl::fromUserInput(input);
if (url.isLocalFile()) { if (url.isLocalFile()) {
// FIXME: actually do some validation of what's inside here... this is fake AF // FIXME: actually do some validation of what's inside here... this is fake AF