MCPcopy Create free account
hub / github.com/MultiMC/Launcher / executeTask

Method executeTask

launcher/java/JavaInstallList.cpp:145–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145void JavaListLoadTask::executeTask()
146{
147 setStatus(tr("Detecting Java installations..."));
148
149 JavaUtils ju;
150 QList<QString> candidate_paths = ju.FindJavaPaths();
151
152 m_job = new JavaCheckerJob("Java detection");
153 connect(m_job.get(), &Task::finished, this, &JavaListLoadTask::javaCheckerFinished);
154 connect(m_job.get(), &Task::progress, this, &Task::setProgress);
155
156 qDebug() << "Probing the following Java paths: ";
157 int id = 0;
158 for(QString candidate : candidate_paths)
159 {
160 qDebug() << " " << candidate;
161
162 auto candidate_checker = new JavaChecker();
163 candidate_checker->m_path = candidate;
164 candidate_checker->m_id = id;
165 m_job->addJavaCheckerAction(JavaCheckerPtr(candidate_checker));
166
167 id++;
168 }
169
170 m_job->start();
171}
172
173void JavaListLoadTask::javaCheckerFinished()
174{

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