| 144 | } |
| 145 | |
| 146 | void JavaPage::on_javaDetectBtn_clicked() |
| 147 | { |
| 148 | if (JavaUtils::getJavaCheckPath().isEmpty()) { |
| 149 | JavaCommon::javaCheckNotFound(this); |
| 150 | return; |
| 151 | } |
| 152 | |
| 153 | JavaInstallPtr java; |
| 154 | |
| 155 | VersionSelectDialog vselect(APPLICATION->javalist().get(), tr("Select a Java version"), this, true); |
| 156 | vselect.setResizeOn(2); |
| 157 | vselect.exec(); |
| 158 | |
| 159 | if (vselect.result() == QDialog::Accepted && vselect.selectedVersion()) { |
| 160 | java = std::dynamic_pointer_cast<JavaInstall>(vselect.selectedVersion()); |
| 161 | ui->javaPathTextBox->setText(java->path); |
| 162 | if (!java->is_64bit && APPLICATION->settings()->get("MaxMemAlloc").toInt() > 2048) { |
| 163 | CustomMessageBox::selectable(this, tr("Confirm Selection"), |
| 164 | tr("You selected a 32-bit version of Java.\n" |
| 165 | "This installation does not support more than 2048MiB of RAM.\n" |
| 166 | "Please make sure that the maximum memory value is lower."), |
| 167 | QMessageBox::Warning, QMessageBox::Ok, QMessageBox::Ok) |
| 168 | ->exec(); |
| 169 | } |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | void JavaPage::on_javaBrowseBtn_clicked() |
| 174 | { |
nothing calls this directly
no test coverage detected