diff options
author | Petr Mrázek <peterix@gmail.com> | 2016-11-04 01:17:28 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-11-04 01:19:04 +0100 |
commit | 87dd9515052661e622587cafcf972ea1beee8195 (patch) | |
tree | b0e491c544180a9629f78b4fb9df3a383858b26b /api/logic/minecraft | |
parent | 3780a25d27ae5c803ce9ed075928fff365104987 (diff) | |
download | MultiMC-87dd9515052661e622587cafcf972ea1beee8195.tar MultiMC-87dd9515052661e622587cafcf972ea1beee8195.tar.gz MultiMC-87dd9515052661e622587cafcf972ea1beee8195.tar.lz MultiMC-87dd9515052661e622587cafcf972ea1beee8195.tar.xz MultiMC-87dd9515052661e622587cafcf972ea1beee8195.zip |
NOISSUE add a badge for crashed instances
Not persistent across MultiMC runs.
Diffstat (limited to 'api/logic/minecraft')
-rw-r--r-- | api/logic/minecraft/MinecraftInstance.cpp | 8 | ||||
-rw-r--r-- | api/logic/minecraft/onesix/OneSixInstance.cpp | 10 | ||||
-rw-r--r-- | api/logic/minecraft/onesix/update/LibrariesTask.cpp | 2 |
3 files changed, 5 insertions, 15 deletions
diff --git a/api/logic/minecraft/MinecraftInstance.cpp b/api/logic/minecraft/MinecraftInstance.cpp index d3af5011..f0d47733 100644 --- a/api/logic/minecraft/MinecraftInstance.cpp +++ b/api/logic/minecraft/MinecraftInstance.cpp @@ -369,7 +369,7 @@ QString MinecraftInstance::prettifyTimeDuration(int64_t duration) QString MinecraftInstance::getStatusbarDescription() { QStringList traits; - if (flags() & VersionBrokenFlag) + if (hasVersionBroken()) { traits.append(tr("broken")); } @@ -380,12 +380,10 @@ QString MinecraftInstance::getStatusbarDescription() { description.append(tr(", played for %1").arg(prettifyTimeDuration(totalTimePlayed()))); } - /* - if(traits.size()) + if(hasCrashed()) { - description.append(QString(" (%1)").arg(traits.join(", "))); + description.append(tr(", has crashed.")); } - */ return description; } diff --git a/api/logic/minecraft/onesix/OneSixInstance.cpp b/api/logic/minecraft/onesix/OneSixInstance.cpp index d89a7612..859e2e69 100644 --- a/api/logic/minecraft/onesix/OneSixInstance.cpp +++ b/api/logic/minecraft/onesix/OneSixInstance.cpp @@ -526,15 +526,7 @@ QString OneSixInstance::currentVersionId() const void OneSixInstance::reloadProfile() { m_profile->reload(); - auto severity = m_profile->getProblemSeverity(); - if(severity == ProblemSeverity::PROBLEM_ERROR) - { - setFlag(VersionBrokenFlag); - } - else - { - unsetFlag(VersionBrokenFlag); - } + setVersionBroken(m_profile->getProblemSeverity() == ProblemSeverity::PROBLEM_ERROR); emit versionReloaded(); } diff --git a/api/logic/minecraft/onesix/update/LibrariesTask.cpp b/api/logic/minecraft/onesix/update/LibrariesTask.cpp index 1efbc64c..f60c2b5e 100644 --- a/api/logic/minecraft/onesix/update/LibrariesTask.cpp +++ b/api/logic/minecraft/onesix/update/LibrariesTask.cpp @@ -13,7 +13,7 @@ void LibrariesTask::executeTask() qDebug() << m_inst->name() << ": downloading libraries"; OneSixInstance *inst = (OneSixInstance *)m_inst; inst->reloadProfile(); - if(inst->flags() & BaseInstance::VersionBrokenFlag) + if(inst->hasVersionBroken()) { emitFailed(tr("Failed to load the version description files - check the instance for errors.")); return; |