diff options
author | Petr Mrázek <peterix@gmail.com> | 2017-09-22 00:27:30 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2017-09-22 00:27:30 +0200 |
commit | b5b16d0972f40bbfa14518542cbdac20747921ec (patch) | |
tree | 1af62da69c9530e296ebb2d971744373e042e330 /api | |
parent | 76c7e0fe1c23de3ed6f988dac11e72ec2ef6c198 (diff) | |
download | MultiMC-b5b16d0972f40bbfa14518542cbdac20747921ec.tar MultiMC-b5b16d0972f40bbfa14518542cbdac20747921ec.tar.gz MultiMC-b5b16d0972f40bbfa14518542cbdac20747921ec.tar.lz MultiMC-b5b16d0972f40bbfa14518542cbdac20747921ec.tar.xz MultiMC-b5b16d0972f40bbfa14518542cbdac20747921ec.zip |
NOISSUE make instance traits() const
Diffstat (limited to 'api')
-rw-r--r-- | api/logic/BaseInstance.h | 2 | ||||
-rw-r--r-- | api/logic/NullInstance.h | 2 | ||||
-rw-r--r-- | api/logic/minecraft/MinecraftInstance.cpp | 2 | ||||
-rw-r--r-- | api/logic/minecraft/MinecraftInstance.h | 2 | ||||
-rw-r--r-- | api/logic/minecraft/legacy/LegacyInstance.h | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/api/logic/BaseInstance.h b/api/logic/BaseInstance.h index de5d6aff..26d4bc35 100644 --- a/api/logic/BaseInstance.h +++ b/api/logic/BaseInstance.h @@ -128,7 +128,7 @@ public: virtual QStringList extraArguments() const; /// Traits. Normally inside the version, depends on instance implementation. - virtual QSet <QString> traits() = 0; + virtual QSet <QString> traits() const = 0; /** * Gets the time that the instance was last launched. diff --git a/api/logic/NullInstance.h b/api/logic/NullInstance.h index 062c6b5c..f689c5ab 100644 --- a/api/logic/NullInstance.h +++ b/api/logic/NullInstance.h @@ -17,7 +17,7 @@ public: { return tr("Unknown instance type"); }; - virtual QSet< QString > traits() override + virtual QSet< QString > traits() const override { return {}; }; diff --git a/api/logic/minecraft/MinecraftInstance.cpp b/api/logic/minecraft/MinecraftInstance.cpp index b408b07b..4ff85c27 100644 --- a/api/logic/minecraft/MinecraftInstance.cpp +++ b/api/logic/minecraft/MinecraftInstance.cpp @@ -154,7 +154,7 @@ std::shared_ptr<MinecraftProfile> MinecraftInstance::getMinecraftProfile() const return m_profile; } -QSet<QString> MinecraftInstance::traits() +QSet<QString> MinecraftInstance::traits() const { auto version = getMinecraftProfile(); if (!version) diff --git a/api/logic/minecraft/MinecraftInstance.h b/api/logic/minecraft/MinecraftInstance.h index e172edb4..d3a61c5d 100644 --- a/api/logic/minecraft/MinecraftInstance.h +++ b/api/logic/minecraft/MinecraftInstance.h @@ -20,7 +20,7 @@ public: virtual void init() override; QString typeName() const override; - QSet<QString> traits() override; + QSet<QString> traits() const override; bool canEdit() const override { diff --git a/api/logic/minecraft/legacy/LegacyInstance.h b/api/logic/minecraft/legacy/LegacyInstance.h index 5f67cddb..64564591 100644 --- a/api/logic/minecraft/legacy/LegacyInstance.h +++ b/api/logic/minecraft/legacy/LegacyInstance.h @@ -87,7 +87,7 @@ public: QString currentVersionId() const; QString intendedVersionId() const; - QSet<QString> traits() override + QSet<QString> traits() const override { return {"legacy-instance", "texturepacks"}; }; |