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

Method applySettings

launcher/ui/pages/global/JavaPage.cpp:77–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77void JavaPage::applySettings()
78{
79 auto s = APPLICATION->settings();
80
81 // Memory
82 int min = ui->minMemSpinBox->value();
83 int max = ui->maxMemSpinBox->value();
84 if(min < max)
85 {
86 s->set("MinMemAlloc", min);
87 s->set("MaxMemAlloc", max);
88 }
89 else
90 {
91 s->set("MinMemAlloc", max);
92 s->set("MaxMemAlloc", min);
93 }
94 s->set("PermGen", ui->permGenSpinBox->value());
95
96 // Java Settings
97 s->set("JavaPath", ui->javaPathTextBox->text());
98 s->set("JvmArgs", ui->jvmArgsTextBox->toPlainText().replace("\n", " "));
99 s->set("IgnoreJavaCompatibility", ui->skipCompatibilityCheckbox->isChecked());
100 s->set("IgnoreJavaWizard", ui->skipJavaWizardCheckbox->isChecked());
101 JavaCommon::checkJVMArgs(s->get("JvmArgs").toString(), this->parentWidget());
102}
103void JavaPage::loadSettings()
104{
105 auto s = APPLICATION->settings();

Callers

nothing calls this directly

Calls 7

toPlainTextMethod · 0.80
settingsMethod · 0.45
setMethod · 0.45
textMethod · 0.45
replaceMethod · 0.45
toStringMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected