diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-08-04 19:42:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-04 19:42:36 +0200 |
commit | ae793f6cf11658c9abc5111e82d5ba7b3e6af127 (patch) | |
tree | ed41f30e2c0f02e4be1d42324b3f05fbab75b2cd /launcher/meta/BaseEntity.h | |
parent | 50c7d39e082f0a7dbd977401e16d5adf534d9770 (diff) | |
parent | 1d638e018ac40fbfb35dd117f9a948c0cf35eadd (diff) | |
download | PrismLauncher-ae793f6cf11658c9abc5111e82d5ba7b3e6af127.tar.gz PrismLauncher-ae793f6cf11658c9abc5111e82d5ba7b3e6af127.tar.bz2 PrismLauncher-ae793f6cf11658c9abc5111e82d5ba7b3e6af127.zip |
Merge pull request #1459 from Scrumplex/format
Diffstat (limited to 'launcher/meta/BaseEntity.h')
-rw-r--r-- | launcher/meta/BaseEntity.h | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/launcher/meta/BaseEntity.h b/launcher/meta/BaseEntity.h index 75fa384a..1336a521 100644 --- a/launcher/meta/BaseEntity.h +++ b/launcher/meta/BaseEntity.h @@ -22,30 +22,17 @@ #include "net/Mode.h" #include "net/NetJob.h" -namespace Meta -{ -class BaseEntity -{ -public: /* types */ +namespace Meta { +class BaseEntity { + public: /* types */ using Ptr = std::shared_ptr<BaseEntity>; - enum class LoadStatus - { - NotLoaded, - Local, - Remote - }; - enum class UpdateStatus - { - NotDone, - InProgress, - Failed, - Succeeded - }; + enum class LoadStatus { NotLoaded, Local, Remote }; + enum class UpdateStatus { NotDone, InProgress, Failed, Succeeded }; -public: + public: virtual ~BaseEntity(); - virtual void parse(const QJsonObject &obj) = 0; + virtual void parse(const QJsonObject& obj) = 0; virtual QString localFilename() const = 0; virtual QUrl url() const; @@ -56,12 +43,12 @@ public: void load(Net::Mode loadType); Task::Ptr getCurrentTask(); -protected: /* methods */ + protected: /* methods */ bool loadLocalFile(); -private: + private: LoadStatus m_loadStatus = LoadStatus::NotLoaded; UpdateStatus m_updateStatus = UpdateStatus::NotDone; NetJob::Ptr m_updateTask; }; -} +} // namespace Meta |