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

Method on_javaDetectBtn_clicked

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

Source from the content-addressed store, hash-verified

126}
127
128void JavaPage::on_javaDetectBtn_clicked()
129{
130 if (JavaUtils::getJavaCheckPath().isEmpty()) {
131 JavaCommon::javaCheckNotFound(this);
132 return;
133 }
134
135 JavaInstallPtr java;
136
137 VersionSelectDialog vselect(APPLICATION->javalist().get(), tr("Select a Java version"), this, true);
138 vselect.setResizeOn(2);
139 vselect.exec();
140
141 if (vselect.result() == QDialog::Accepted && vselect.selectedVersion())
142 {
143 java = std::dynamic_pointer_cast<JavaInstall>(vselect.selectedVersion());
144 ui->javaPathTextBox->setText(java->path);
145 }
146}
147
148void JavaPage::on_javaBrowseBtn_clicked()
149{

Callers

nothing calls this directly

Calls 8

isEmptyMethod · 0.80
javalistMethod · 0.80
getMethod · 0.45
setResizeOnMethod · 0.45
execMethod · 0.45
resultMethod · 0.45
selectedVersionMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected