GH-2050 fix cancel button in file browse dialogs filling text fields
This commit is contained in:
parent
95e6f37d39
commit
4bae6fe491
7 changed files with 19 additions and 22 deletions
|
@ -212,13 +212,13 @@ void InstanceSettingsPage::on_javaDetectBtn_clicked()
|
|||
void InstanceSettingsPage::on_javaBrowseBtn_clicked()
|
||||
{
|
||||
QString raw_path = QFileDialog::getOpenFileName(this, tr("Find Java executable"));
|
||||
QString cooked_path = FS::NormalizePath(raw_path);
|
||||
|
||||
// do not allow current dir - it's dirty. Do not allow dirs that don't exist
|
||||
if(cooked_path.isEmpty())
|
||||
if(raw_path.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
QString cooked_path = FS::NormalizePath(raw_path);
|
||||
|
||||
QFileInfo javaInfo(cooked_path);;
|
||||
if(!javaInfo.exists() || !javaInfo.isExecutable())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue