| 459 | } |
| 460 | |
| 461 | void InstanceSettingsPage::on_javaBrowseBtn_clicked() |
| 462 | { |
| 463 | QString raw_path = QFileDialog::getOpenFileName(this, tr("Find Java executable")); |
| 464 | |
| 465 | // do not allow current dir - it's dirty. Do not allow dirs that don't exist |
| 466 | if(raw_path.isEmpty()) |
| 467 | { |
| 468 | return; |
| 469 | } |
| 470 | QString cooked_path = FS::NormalizePath(raw_path); |
| 471 | |
| 472 | QFileInfo javaInfo(cooked_path); |
| 473 | if(!javaInfo.exists() || !javaInfo.isExecutable()) |
| 474 | { |
| 475 | return; |
| 476 | } |
| 477 | ui->javaPathTextBox->setText(cooked_path); |
| 478 | |
| 479 | // custom Java could be anything... enable perm gen option |
| 480 | ui->permGenSpinBox->setVisible(true); |
| 481 | ui->labelPermGen->setVisible(true); |
| 482 | ui->labelPermgenNote->setVisible(true); |
| 483 | m_settings->set("PermGenVisible", true); |
| 484 | } |
| 485 | |
| 486 | void InstanceSettingsPage::on_javaTestBtn_clicked() |
| 487 | { |
nothing calls this directly
no test coverage detected