summaryrefslogtreecommitdiffstats
path: root/logic/BaseInstance.cpp
diff options
context:
space:
mode:
authorJan Dalheimer <jan@dalheimer.de>2014-03-10 17:38:27 +0100
committerJan Dalheimer <jan@dalheimer.de>2014-03-10 17:38:27 +0100
commit73fc9c79cff979e9023df0b1a77848c67b590681 (patch)
tree7c8be387b504eccf35e4e3422b39a78d47354e7d /logic/BaseInstance.cpp
parent737169d1d3ac62a7db99d51e892289aee8c1d3a3 (diff)
downloadMultiMC-73fc9c79cff979e9023df0b1a77848c67b590681.tar
MultiMC-73fc9c79cff979e9023df0b1a77848c67b590681.tar.gz
MultiMC-73fc9c79cff979e9023df0b1a77848c67b590681.tar.lz
MultiMC-73fc9c79cff979e9023df0b1a77848c67b590681.tar.xz
MultiMC-73fc9c79cff979e9023df0b1a77848c67b590681.zip
Instance badges. Some easter eggs and one for broken so far.
Diffstat (limited to 'logic/BaseInstance.cpp')
-rw-r--r--logic/BaseInstance.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/logic/BaseInstance.cpp b/logic/BaseInstance.cpp
index d78f1ea0..24af20cf 100644
--- a/logic/BaseInstance.cpp
+++ b/logic/BaseInstance.cpp
@@ -37,7 +37,6 @@ BaseInstance::BaseInstance(BaseInstancePrivate *d_in, const QString &rootDir,
I_D(BaseInstance);
d->m_settings = settings_obj;
d->m_rootDir = rootDir;
- d->m_flags = 0;
settings().registerSetting("name", "Unnamed Instance");
settings().registerSetting("iconKey", "default");
@@ -147,13 +146,13 @@ SettingsObject &BaseInstance::settings() const
return *d->m_settings;
}
-BaseInstance::InstanceFlags BaseInstance::flags() const
+QSet<BaseInstance::InstanceFlag> BaseInstance::flags() const
{
I_D(const BaseInstance);
- return InstanceFlags(d->m_flags);
+ return QSet<InstanceFlag>(d->m_flags);
}
-void BaseInstance::setFlags(const BaseInstance::InstanceFlags flags)
+void BaseInstance::setFlags(const QSet<InstanceFlag> &flags)
{
I_D(BaseInstance);
if (flags != d->m_flags)
@@ -166,7 +165,7 @@ void BaseInstance::setFlags(const BaseInstance::InstanceFlags flags)
bool BaseInstance::canLaunch() const
{
- return !(flags() & VersionBrokenFlag);
+ return !flags().contains(VersionBrokenFlag);
}
QString BaseInstance::baseJar() const