MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / on_javaBrowseBtn_clicked

Method on_javaBrowseBtn_clicked

launcher/ui/pages/global/JavaPage.cpp:148–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148void JavaPage::on_javaBrowseBtn_clicked()
149{
150 QString raw_path = QFileDialog::getOpenFileName(this, tr("Find Java executable"));
151
152 // do not allow current dir - it's dirty. Do not allow dirs that don't exist
153 if(raw_path.isEmpty())
154 {
155 return;
156 }
157
158 QString cooked_path = FS::NormalizePath(raw_path);
159 QFileInfo javaInfo(cooked_path);;
160 if(!javaInfo.exists() || !javaInfo.isExecutable())
161 {
162 return;
163 }
164 ui->javaPathTextBox->setText(cooked_path);
165}
166
167void JavaPage::on_javaTestBtn_clicked()
168{

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected