diff options
author | Petr Mrázek <peterix@gmail.com> | 2017-01-07 06:52:09 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2017-01-07 06:52:09 +0100 |
commit | c4ec6bc0f552fe7af693d52826c82f1e7db908de (patch) | |
tree | 9495ce54fb743bbeba188198b3cf00ec978c4603 /application/setupwizard/JavaWizardPage.h | |
parent | 705a658fefb3f5fe4fba9b621df70ae551272864 (diff) | |
download | MultiMC-c4ec6bc0f552fe7af693d52826c82f1e7db908de.tar MultiMC-c4ec6bc0f552fe7af693d52826c82f1e7db908de.tar.gz MultiMC-c4ec6bc0f552fe7af693d52826c82f1e7db908de.tar.lz MultiMC-c4ec6bc0f552fe7af693d52826c82f1e7db908de.tar.xz MultiMC-c4ec6bc0f552fe7af693d52826c82f1e7db908de.zip |
NOISSUE polish the java setup wizard page
* Added a button to check why Java failed
* It will now avoid automatically scanning binaries that do not have 'java' in their filename
* Fixed some crashes related to running too many Java checks (it only does one at a time now)
* It can now distinguish between more Java failure states (not there at all, crashing, returning nonsense)
* Changed '...' button to Browse button to match the wizard page subtitle
* Changing minimum and maximum memory will no longer trigger a java check twice
Diffstat (limited to 'application/setupwizard/JavaWizardPage.h')
-rw-r--r-- | application/setupwizard/JavaWizardPage.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/application/setupwizard/JavaWizardPage.h b/application/setupwizard/JavaWizardPage.h index 5a61ff02..56a40453 100644 --- a/application/setupwizard/JavaWizardPage.h +++ b/application/setupwizard/JavaWizardPage.h @@ -15,7 +15,7 @@ class QHBoxLayout; class QGroupBox; class QGridLayout; class QLabel; -class IconLabel; +class QToolButton; class JavaWizardPage : public BaseWizardPage { @@ -35,15 +35,20 @@ public: enum class JavaStatus { + NotSet, Pending, Good, - Bad - } javaStatus; + DoesNotExist, + DoesNotStart, + ReturnedInvalidData + } javaStatus = JavaStatus::NotSet; protected slots: void memoryValueChanged(int); + void javaPathEdited(const QString &path); void javaVersionSelected(BaseVersionPtr version); void on_javaBrowseBtn_clicked(); + void on_javaStatusBtn_clicked(); void checkFinished(JavaCheckResult result); protected: /* methods */ @@ -58,7 +63,7 @@ private: /* data */ QLineEdit * m_javaPathTextBox = nullptr; QPushButton * m_javaBrowseBtn = nullptr; - IconLabel * m_javaStatusLabel = nullptr; + QToolButton * m_javaStatusBtn = nullptr; QHBoxLayout *m_horizontalLayout = nullptr; QGroupBox *m_memoryGroupBox = nullptr; @@ -73,7 +78,12 @@ private: /* data */ QIcon yellowIcon; QIcon badIcon; + int observedMinMemory = 0; + int observedMaxMemory = 0; + int observedPermGenMemory = 0; + QString queuedCheck; uint64_t m_availableMemory = 0ull; shared_qobject_ptr<JavaChecker> m_checker; + JavaCheckResult m_result; }; |