MCPcopy Create free account
hub / github.com/ElyPrismLauncher/Launcher / validatePage

Method validatePage

launcher/ui/setupwizard/JavaWizardPage.cpp:51–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51bool JavaWizardPage::validatePage()
52{
53 auto settings = APPLICATION->settings();
54 auto result = m_java_widget->validate();
55 settings->set("AutomaticJavaSwitch", m_java_widget->autoDetectJava());
56 settings->set("AutomaticJavaDownload", m_java_widget->autoDownloadJava());
57 settings->set("UserAskedAboutAutomaticJavaDownload", true);
58 switch (result) {
59 default:
60 case JavaWizardWidget::ValidationStatus::Bad: {
61 return false;
62 }
63 case JavaWizardWidget::ValidationStatus::AllOK: {
64 settings->set("JavaPath", m_java_widget->javaPath());
65 } /* fallthrough */
66 case JavaWizardWidget::ValidationStatus::JavaBad: {
67 // Memory
68 auto s = APPLICATION->settings();
69 s->set("MinMemAlloc", m_java_widget->minHeapSize());
70 s->set("MaxMemAlloc", m_java_widget->maxHeapSize());
71 if (m_java_widget->permGenEnabled()) {
72 s->set("PermGen", m_java_widget->permGenSize());
73 } else {
74 s->reset("PermGen");
75 }
76 return true;
77 }
78 }
79}
80
81void JavaWizardPage::retranslate()
82{

Callers

nothing calls this directly

Calls 11

autoDetectJavaMethod · 0.80
autoDownloadJavaMethod · 0.80
minHeapSizeMethod · 0.80
maxHeapSizeMethod · 0.80
permGenEnabledMethod · 0.80
permGenSizeMethod · 0.80
settingsMethod · 0.45
validateMethod · 0.45
setMethod · 0.45
javaPathMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected