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

Method checkJavaPath

launcher/ui/widgets/JavaSettingsWidget.cpp:373–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371}
372
373void JavaSettingsWidget::checkJavaPath(const QString &path)
374{
375 if(m_checker)
376 {
377 queuedCheck = path;
378 return;
379 }
380 auto realPath = FS::ResolveExecutable(path);
381 if(realPath.isNull())
382 {
383 setJavaStatus(JavaStatus::DoesNotExist);
384 return;
385 }
386 setJavaStatus(JavaStatus::Pending);
387 m_checker.reset(new JavaChecker());
388 m_checker->m_path = path;
389 m_checker->m_minMem = m_minMemSpinBox->value();
390 m_checker->m_maxMem = m_maxMemSpinBox->value();
391 if(m_permGenSpinBox->isVisible())
392 {
393 m_checker->m_permGen = m_permGenSpinBox->value();
394 }
395 connect(m_checker.get(), &JavaChecker::checkFinished, this, &JavaSettingsWidget::checkFinished);
396 m_checker->performCheck();
397}
398
399void JavaSettingsWidget::checkFinished(JavaCheckResult result)
400{

Callers

nothing calls this directly

Calls 4

ResolveExecutableFunction · 0.85
performCheckMethod · 0.80
resetMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected