diff options
author | TheKodeToad <TheKodeToad@proton.me> | 2023-08-16 20:46:16 +0100 |
---|---|---|
committer | TheKodeToad <TheKodeToad@proton.me> | 2023-08-16 22:23:38 +0100 |
commit | 3e2733d840d24ce4f46b49bca0b8656d4d6e3d87 (patch) | |
tree | 386113207514b8071b0122b318c10439259ca83c /launcher/minecraft/Component.h | |
parent | 57430fd189aed592a170d597de61b3acabaaa43d (diff) | |
parent | c88088c91a92a371a9bc2b7384c2897157772b7e (diff) | |
download | PrismLauncher-3e2733d840d24ce4f46b49bca0b8656d4d6e3d87.tar.gz PrismLauncher-3e2733d840d24ce4f46b49bca0b8656d4d6e3d87.tar.bz2 PrismLauncher-3e2733d840d24ce4f46b49bca0b8656d4d6e3d87.zip |
Merge branch 'develop' into better-launch
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Diffstat (limited to 'launcher/minecraft/Component.h')
-rw-r--r-- | launcher/minecraft/Component.h | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/launcher/minecraft/Component.h b/launcher/minecraft/Component.h index ef7c9947..3474a22e 100644 --- a/launcher/minecraft/Component.h +++ b/launcher/minecraft/Component.h @@ -1,37 +1,36 @@ #pragma once -#include <memory> -#include <QList> -#include <QJsonDocument> #include <QDateTime> -#include "meta/JsonFormat.h" +#include <QJsonDocument> +#include <QList> +#include <memory> #include "ProblemProvider.h" #include "QObjectPtr.h" +#include "meta/JsonFormat.h" class PackProfile; class LaunchProfile; -namespace Meta -{ - class Version; - class VersionList; -} +namespace Meta { +class Version; +class VersionList; +} // namespace Meta class VersionFile; -class Component : public QObject, public ProblemProvider -{ -Q_OBJECT -public: - Component(PackProfile * parent, const QString &uid); +class Component : public QObject, public ProblemProvider { + Q_OBJECT + public: + Component(PackProfile* parent, const QString& uid); // DEPRECATED: remove these constructors? - Component(PackProfile * parent, std::shared_ptr<Meta::Version> version); - Component(PackProfile * parent, const QString & uid, std::shared_ptr<VersionFile> file); + Component(PackProfile* parent, std::shared_ptr<Meta::Version> version); + Component(PackProfile* parent, const QString& uid, std::shared_ptr<VersionFile> file); - virtual ~Component(){}; - void applyTo(LaunchProfile *profile); + virtual ~Component() {} + + void applyTo(LaunchProfile* profile); bool isEnabled(); - bool setEnabled (bool state); + bool setEnabled(bool state); bool canBeDisabled(); bool isMoveable(); @@ -56,23 +55,22 @@ public: std::shared_ptr<class VersionFile> getVersionFile() const; std::shared_ptr<class Meta::VersionList> getVersionList() const; - void setImportant (bool state); - + void setImportant(bool state); const QList<PatchProblem> getProblems() const override; ProblemSeverity getProblemSeverity() const override; - void setVersion(const QString & version); + void setVersion(const QString& version); bool customize(); bool revert(); void updateCachedData(); -signals: + signals: void dataChanged(); -public: /* data */ - PackProfile * m_parent; + public: /* data */ + PackProfile* m_parent; // BEGIN: persistent component list properties /// ID of the component |