MCPcopy Create free account
hub / github.com/PrismLauncher/PrismLauncher / onJavaBrowse

Method onJavaBrowse

launcher/ui/widgets/JavaSettingsWidget.cpp:230–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230void JavaSettingsWidget::onJavaBrowse()
231{
232 QString rawPath = QFileDialog::getOpenFileName(this, tr("Find Java executable"));
233
234 // do not allow current dir - it's dirty. Do not allow dirs that don't exist
235 if (rawPath.isEmpty()) {
236 return;
237 }
238
239 QString cookedPath = FS::NormalizePath(rawPath);
240 QFileInfo javaInfo(cookedPath);
241 if (!javaInfo.exists() || !javaInfo.isExecutable()) {
242 return;
243 }
244 m_ui->javaPathTextBox->setText(cookedPath);
245}
246
247void JavaSettingsWidget::onJavaTest()
248{

Callers

nothing calls this directly

Calls 4

NormalizePathFunction · 0.85
isEmptyMethod · 0.45
existsMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected