diff options
| author | TheKodeToad <freezingma1l@outlook.com> | 2023-03-02 10:10:46 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-02 10:10:46 +0000 |
| commit | 5c913149c84c121523a1ae403848d3e0926de244 (patch) | |
| tree | 3789176d454bd988b7e572e5f411151efc2cb7e2 /launcher/meta | |
| parent | cbe6eff2fa917401b913a96c551429caad852b3b (diff) | |
| parent | 9265c319a96b3dd5681767c196a397fbbae9164a (diff) | |
| download | PrismLauncher-5c913149c84c121523a1ae403848d3e0926de244.tar.gz PrismLauncher-5c913149c84c121523a1ae403848d3e0926de244.tar.bz2 PrismLauncher-5c913149c84c121523a1ae403848d3e0926de244.zip | |
Merge branch 'PrismLauncher:develop' into modrinth-token
Diffstat (limited to 'launcher/meta')
| -rw-r--r-- | launcher/meta/Version.cpp | 5 | ||||
| -rw-r--r-- | launcher/meta/Version.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/launcher/meta/Version.cpp b/launcher/meta/Version.cpp index 68cfa55c..e617abf8 100644 --- a/launcher/meta/Version.cpp +++ b/launcher/meta/Version.cpp @@ -99,6 +99,11 @@ QString Meta::Version::localFilename() const return m_uid + '/' + m_version + ".json"; } +::Version Meta::Version::toComparableVersion() const +{ + return { const_cast<Meta::Version*>(this)->descriptor() }; +} + void Meta::Version::setType(const QString &type) { m_type = type; diff --git a/launcher/meta/Version.h b/launcher/meta/Version.h index 7228fa36..78156193 100644 --- a/launcher/meta/Version.h +++ b/launcher/meta/Version.h @@ -16,6 +16,7 @@ #pragma once #include "BaseVersion.h" +#include "../Version.h" #include <QJsonObject> #include <QStringList> @@ -85,6 +86,8 @@ public: QString localFilename() const override; + [[nodiscard]] ::Version toComparableVersion() const; + public: // for usage by format parsers only void setType(const QString &type); void setTime(const qint64 time); |
