mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-03 20:06:58 +03:00
Notify the user of any errors
This commit is contained in:
parent
c01678a3fa
commit
5d0868a056
4 changed files with 19 additions and 7 deletions
|
|
@ -142,12 +142,21 @@ void SettingsDialog::on_jsonEditorBrowseBtn_clicked()
|
|||
: ui->jsonEditorTextBox->text());
|
||||
QString cooked_file = NormalizePath(raw_file);
|
||||
|
||||
if (cooked_file.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// it has to exist and be an executable
|
||||
if (!cooked_file.isEmpty() && QFileInfo(cooked_file).exists() &&
|
||||
if (QFileInfo(cooked_file).exists() &&
|
||||
QFileInfo(cooked_file).isExecutable())
|
||||
{
|
||||
ui->jsonEditorTextBox->setText(cooked_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(this, tr("Invalid"), tr("The file choosen does not seem to be an executable"));
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsDialog::on_maximizedCheckBox_clicked(bool checked)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue