| 56 | } |
| 57 | |
| 58 | bool 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 | |
| 93 | void JavaWizardPage::retranslate() |
| 94 | { |
nothing calls this directly
no test coverage detected