From a008efd24e81441a23ff3e81320ac3522251327e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 2 Jan 2016 00:35:54 +0100 Subject: GH-1365 rework java version parsing and sorting --- logic/java/JavaVersion.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 logic/java/JavaVersion.h (limited to 'logic/java/JavaVersion.h') diff --git a/logic/java/JavaVersion.h b/logic/java/JavaVersion.h new file mode 100644 index 00000000..f9a733d3 --- /dev/null +++ b/logic/java/JavaVersion.h @@ -0,0 +1,30 @@ +#pragma once + +#include "multimc_logic_export.h" +#include + +class MULTIMC_LOGIC_EXPORT JavaVersion +{ + friend class JavaVersionTest; +public: + JavaVersion() {}; + JavaVersion(const QString & rhs); + + JavaVersion & operator=(const QString & rhs); + + bool operator<(const JavaVersion & rhs); + bool operator==(const JavaVersion & rhs); + bool operator>(const JavaVersion & rhs); + + bool requiresPermGen(); + + QString toString(); + +private: + QString string; + int major = 0; + int minor = 0; + int security = 0; + bool parseable = false; + QString prerelease; +}; -- cgit v1.2.3