From 884fe0d5741de2a8a78f48c5d37274d8f174ba3a Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Sun, 20 Nov 2022 18:16:19 +0100 Subject: feat: validate maximum memory allocation in wizard Signed-off-by: Sefa Eyeoglu --- launcher/ui/widgets/JavaSettingsWidget.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'launcher/ui/widgets/JavaSettingsWidget.h') diff --git a/launcher/ui/widgets/JavaSettingsWidget.h b/launcher/ui/widgets/JavaSettingsWidget.h index 5344e2cd..e4b7c712 100644 --- a/launcher/ui/widgets/JavaSettingsWidget.h +++ b/launcher/ui/widgets/JavaSettingsWidget.h @@ -56,6 +56,8 @@ public: int maxHeapSize() const; QString javaPath() const; + void updateThresholds(); + protected slots: void memoryValueChanged(int); @@ -85,6 +87,7 @@ private: /* data */ QSpinBox *m_maxMemSpinBox = nullptr; QLabel *m_labelMinMem = nullptr; QLabel *m_labelMaxMem = nullptr; + QLabel *m_labelMaxMemIcon = nullptr; QSpinBox *m_minMemSpinBox = nullptr; QLabel *m_labelPermGen = nullptr; QSpinBox *m_permGenSpinBox = nullptr; @@ -92,9 +95,9 @@ private: /* data */ QIcon yellowIcon; QIcon badIcon; - int observedMinMemory = 0; - int observedMaxMemory = 0; - int observedPermGenMemory = 0; + unsigned int observedMinMemory = 0; + unsigned int observedMaxMemory = 0; + unsigned int observedPermGenMemory = 0; QString queuedCheck; uint64_t m_availableMemory = 0ull; shared_qobject_ptr m_checker; -- cgit