MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / validatePage

Method validatePage

launcher/ui/setupwizard/JavaWizardPage.cpp:52–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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