From 20b9f2b42a3b58b6081af271774fbcc34025dccb Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Sun, 25 Jul 2021 19:11:59 +0200 Subject: NOISSUE Flatten gui and logic libraries into MultiMC --- application/setupwizard/JavaWizardPage.cpp | 96 ------------------------------ 1 file changed, 96 deletions(-) delete mode 100644 application/setupwizard/JavaWizardPage.cpp (limited to 'application/setupwizard/JavaWizardPage.cpp') diff --git a/application/setupwizard/JavaWizardPage.cpp b/application/setupwizard/JavaWizardPage.cpp deleted file mode 100644 index ad571c09..00000000 --- a/application/setupwizard/JavaWizardPage.cpp +++ /dev/null @@ -1,96 +0,0 @@ -#include "JavaWizardPage.h" -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include "widgets/JavaSettingsWidget.h" - - -JavaWizardPage::JavaWizardPage(QWidget *parent) - :BaseWizardPage(parent) -{ - setupUi(); -} - -void JavaWizardPage::setupUi() -{ - setObjectName(QStringLiteral("javaPage")); - QVBoxLayout * layout = new QVBoxLayout(this); - - m_java_widget = new JavaSettingsWidget(this); - layout->addWidget(m_java_widget); - setLayout(layout); - - retranslate(); -} - -void JavaWizardPage::refresh() -{ - m_java_widget->refresh(); -} - -void JavaWizardPage::initializePage() -{ - m_java_widget->initialize(); -} - -bool JavaWizardPage::wantsRefreshButton() -{ - return true; -} - -bool JavaWizardPage::validatePage() -{ - auto settings = MMC->settings(); - auto result = m_java_widget->validate(); - switch(result) - { - default: - case JavaSettingsWidget::ValidationStatus::Bad: - { - return false; - } - case JavaSettingsWidget::ValidationStatus::AllOK: - { - settings->set("JavaPath", m_java_widget->javaPath()); - } - case JavaSettingsWidget::ValidationStatus::JavaBad: - { - // Memory - auto s = MMC->settings(); - s->set("MinMemAlloc", m_java_widget->minHeapSize()); - s->set("MaxMemAlloc", m_java_widget->maxHeapSize()); - if (m_java_widget->permGenEnabled()) - { - s->set("PermGen", m_java_widget->permGenSize()); - } - else - { - s->reset("PermGen"); - } - return true; - } - } -} - -void JavaWizardPage::retranslate() -{ - setTitle(tr("Java")); - setSubTitle(tr("You do not have a working Java set up yet or it went missing.\n" - "Please select one of the following or browse for a java executable.")); - m_java_widget->retranslate(); -} -- cgit