diff options
| author | Trial97 <alexandru.tripon97@gmail.com> | 2023-05-31 20:12:12 +0300 |
|---|---|---|
| committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-05-31 20:12:12 +0300 |
| commit | 29c3dc40ef7f5b1fce5ab5970a39613d0f7f5089 (patch) | |
| tree | ce92f8a86d08531879105a16194a14391c0ae2ea /launcher/meta | |
| parent | e8ee4497f77a571b305a48b70f84c8729b800859 (diff) | |
| parent | 954d4d701a136e79c25b58f9680d26a555a6e6fe (diff) | |
| download | PrismLauncher-29c3dc40ef7f5b1fce5ab5970a39613d0f7f5089.tar.gz PrismLauncher-29c3dc40ef7f5b1fce5ab5970a39613d0f7f5089.tar.bz2 PrismLauncher-29c3dc40ef7f5b1fce5ab5970a39613d0f7f5089.zip | |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into logdir
Diffstat (limited to 'launcher/meta')
| -rw-r--r-- | launcher/meta/BaseEntity.cpp | 2 | ||||
| -rw-r--r-- | launcher/meta/Version.cpp | 5 | ||||
| -rw-r--r-- | launcher/meta/Version.h | 3 |
3 files changed, 9 insertions, 1 deletions
diff --git a/launcher/meta/BaseEntity.cpp b/launcher/meta/BaseEntity.cpp index de4e1012..97815eba 100644 --- a/launcher/meta/BaseEntity.cpp +++ b/launcher/meta/BaseEntity.cpp @@ -126,7 +126,7 @@ void Meta::BaseEntity::load(Net::Mode loadType) { return; } - m_updateTask = new NetJob(QObject::tr("Download of meta file %1").arg(localFilename()), APPLICATION->network()); + m_updateTask.reset(new NetJob(QObject::tr("Download of meta file %1").arg(localFilename()), APPLICATION->network())); auto url = this->url(); auto entry = APPLICATION->metacache()->resolveEntry("meta", localFilename()); entry->setStale(true); 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); |
