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

Method executeTask

launcher/java/JavaInstallList.cpp:164–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164void JavaListLoadTask::executeTask()
165{
166 setStatus(tr("Detecting Java installations..."));
167
168 JavaUtils ju;
169 QList<QString> candidate_paths = ju.FindJavaPaths();
170
171 m_job = new JavaCheckerJob("Java detection");
172 connect(m_job.get(), &Task::finished, this, &JavaListLoadTask::javaCheckerFinished);
173 connect(m_job.get(), &Task::progress, this, &Task::setProgress);
174
175 qDebug() << "Probing the following Java paths: ";
176 int id = 0;
177 for(QString candidate : candidate_paths)
178 {
179 qDebug() << " " << candidate;
180
181 auto candidate_checker = new JavaChecker();
182 candidate_checker->m_path = candidate;
183 candidate_checker->m_id = id;
184 m_job->addJavaCheckerAction(JavaCheckerPtr(candidate_checker));
185
186 id++;
187 }
188
189 m_job->start();
190}
191
192void JavaListLoadTask::javaCheckerFinished()
193{

Callers

nothing calls this directly

Calls 4

FindJavaPathsMethod · 0.80
addJavaCheckerActionMethod · 0.80
getMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected