diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-05-26 16:23:43 -0700 |
---|---|---|
committer | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-05-26 16:23:43 -0700 |
commit | cf4df19986fe53357ef04b2a4407f69a2f4fa196 (patch) | |
tree | 2750dc9c35dd98fee709db4ab2b2d87280b54994 /launcher/modplatform/ModIndex.h | |
parent | c15603406907383c58786cb1dc235ac79c7f9626 (diff) | |
download | PrismLauncher-cf4df19986fe53357ef04b2a4407f69a2f4fa196.tar.gz PrismLauncher-cf4df19986fe53357ef04b2a4407f69a2f4fa196.tar.bz2 PrismLauncher-cf4df19986fe53357ef04b2a4407f69a2f4fa196.zip |
feat: display release type
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/modplatform/ModIndex.h')
-rw-r--r-- | launcher/modplatform/ModIndex.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/launcher/modplatform/ModIndex.h b/launcher/modplatform/ModIndex.h index f15b296a..10b61b16 100644 --- a/launcher/modplatform/ModIndex.h +++ b/launcher/modplatform/ModIndex.h @@ -63,6 +63,7 @@ struct IndexedVersionType { IndexedVersionType(int type); IndexedVersionType(const IndexedVersionType::Enum& type); IndexedVersionType(const IndexedVersionType& type); + IndexedVersionType() : IndexedVersionType(IndexedVersionType::Enum::UNKNOWN) {} static const QString toString (const IndexedVersionType::Enum& type); static const IndexedVersionType::Enum enumFromString(const QString& type); bool isValid() const {return m_type != IndexedVersionType::Enum::UNKNOWN; } @@ -70,6 +71,7 @@ struct IndexedVersionType { bool operator==(const IndexedVersionType::Enum& type) const { return m_type == type; } bool operator<(const IndexedVersionType& other) const { return m_type < other.m_type; } bool operator<(const IndexedVersionType::Enum& type) const { return m_type < type; } + QString toString() const { return toString(m_type); } IndexedVersionType::Enum m_type; }; @@ -79,7 +81,7 @@ struct IndexedVersion { QVariant fileId; QString version; QString version_number = {}; - std::optional<IndexedVersionType> verison_type = {}; + IndexedVersionType verison_type; QStringList mcVersion; QString downloadUrl; QString date; |