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

Method validatePage

launcher/ui/setupwizard/JavaWizardPage.cpp:58–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58bool JavaWizardPage::validatePage()
59{
60 auto settings = APPLICATION->settings();
61 auto result = m_java_widget->validate();
62 switch(result)
63 {
64 default:
65 case JavaSettingsWidget::ValidationStatus::Bad:
66 {
67 return false;
68 }
69 case JavaSettingsWidget::ValidationStatus::AllOK:
70 {
71 settings->set("JavaPath", m_java_widget->javaPath());
72 [[fallthrough]];
73 }
74 case JavaSettingsWidget::ValidationStatus::JavaBad:
75 {
76 // Memory
77 auto s = APPLICATION->settings();
78 s->set("MinMemAlloc", m_java_widget->minHeapSize());
79 s->set("MaxMemAlloc", m_java_widget->maxHeapSize());
80 if (m_java_widget->permGenEnabled())
81 {
82 s->set("PermGen", m_java_widget->permGenSize());
83 }
84 else
85 {
86 s->reset("PermGen");
87 }
88 return true;
89 }
90 }
91}
92
93void JavaWizardPage::retranslate()
94{

Callers

nothing calls this directly

Calls 9

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

Tested by

no test coverage detected