aboutsummaryrefslogtreecommitdiff
path: root/launcher/meta/BaseEntity.h
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2023-08-14 18:16:53 +0200
committerSefa Eyeoglu <contact@scrumplex.net>2023-08-14 18:16:53 +0200
commit91ba4cf75ee30c64779edb5b7644e5a830de5026 (patch)
treeaa8c2433bfc3a54577aceeb706c4c2cd0986c95d /launcher/meta/BaseEntity.h
parent779f70057b021e285afd60cc650a14cd5feacffd (diff)
downloadPrismLauncher-91ba4cf75ee30c64779edb5b7644e5a830de5026.tar.gz
PrismLauncher-91ba4cf75ee30c64779edb5b7644e5a830de5026.tar.bz2
PrismLauncher-91ba4cf75ee30c64779edb5b7644e5a830de5026.zip
chore: reformat
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/meta/BaseEntity.h')
-rw-r--r--launcher/meta/BaseEntity.h33
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