summaryrefslogtreecommitdiffstats
path: root/logic/OneSixInstance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/OneSixInstance.cpp')
-rw-r--r--logic/OneSixInstance.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/logic/OneSixInstance.cpp b/logic/OneSixInstance.cpp
index 82d4e480..00d8a9db 100644
--- a/logic/OneSixInstance.cpp
+++ b/logic/OneSixInstance.cpp
@@ -418,7 +418,7 @@ void OneSixInstance::reloadVersion()
try
{
d->version->reload(externalPatches());
- d->m_flags.remove(VersionBrokenFlag);
+ unsetFlag(VersionBrokenFlag);
emit versionReloaded();
}
catch (VersionIncomplete &error)
@@ -427,7 +427,7 @@ void OneSixInstance::reloadVersion()
catch (MMCError &error)
{
d->version->clear();
- d->m_flags.insert(VersionBrokenFlag);
+ setFlag(VersionBrokenFlag);
// TODO: rethrow to show some error message(s)?
emit versionReloaded();
throw;
@@ -464,7 +464,7 @@ QString OneSixInstance::getStatusbarDescription()
{
traits.append(tr("custom"));
}
- if (flags().contains(VersionBrokenFlag))
+ if (flags() & VersionBrokenFlag)
{
traits.append(tr("broken"));
}
@@ -569,3 +569,8 @@ QStringList OneSixInstance::extraArguments() const
}
return list;
}
+
+std::shared_ptr<OneSixInstance> OneSixInstance::getSharedPtr()
+{
+ return std::dynamic_pointer_cast<OneSixInstance>(BaseInstance::getSharedPtr());
+}