From 78ee23220f4b755515dfb391aeb3fbdb6d48f0d6 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Mon, 25 Nov 2019 05:31:28 -0500 Subject: bumped to 2.2.2alpha7 use the broom icon for dirty plugins better handling of failing to spawn loot --- src/loot.cpp | 7 +++++-- src/lootdialog.cpp | 16 ++++++++++------ src/pluginlist.cpp | 10 +++++----- src/version.rc | 4 ++-- 4 files changed, 22 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/loot.cpp b/src/loot.cpp index 11eb4f4e..a7251965 100644 --- a/src/loot.cpp +++ b/src/loot.cpp @@ -252,7 +252,7 @@ QString Loot::Report::toMarkdown() const } if (s.isEmpty()) { - s += "**" + QObject::tr("No messages.") + "**"; + s += "**" + QObject::tr("No messages.") + "**\n"; } s += stats.toMarkdown(); @@ -833,7 +833,10 @@ bool runLoot(QWidget* parent, OrganizerCore& core, bool didUpdateMasterList) Loot loot; LootDialog dialog(parent, core, loot); - loot.start(parent, core, didUpdateMasterList); + if (!loot.start(parent, core, didUpdateMasterList)) { + return false; + } + dialog.exec(); return dialog.result(); diff --git a/src/lootdialog.cpp b/src/lootdialog.cpp index 9e269fef..ae3b1164 100644 --- a/src/lootdialog.cpp +++ b/src/lootdialog.cpp @@ -262,12 +262,16 @@ void LootDialog::log(log::Levels lv, const QString& s) void LootDialog::showReport() { - const auto& lootReport = m_loot.report(); + if (m_loot.result()) { + const auto& lootReport = m_loot.report(); - m_core.pluginList()->clearAdditionalInformation(); - for (auto&& p : lootReport.plugins) { - m_core.pluginList()->addLootReport(p.name, p); - } + m_core.pluginList()->clearAdditionalInformation(); + for (auto&& p : lootReport.plugins) { + m_core.pluginList()->addLootReport(p.name, p); + } - m_report.setText(lootReport.toMarkdown()); + m_report.setText(lootReport.toMarkdown()); + } else { + m_report.setText("**" + tr("Loot failed to run") + "**"); + } } diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index e91d820d..3f2f4018 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -1214,10 +1214,14 @@ QVariant PluginList::iconData(const QModelIndex &modelIndex) const result.append(":/MO/gui/archive_conflict_neutral"); } - if (esp.isLightFlagged && !m_ESPs[index].isLight) { + if (esp.isLightFlagged && !esp.isLight) { result.append(":/MO/gui/awaiting"); } + if (info && !info->loot.dirty.empty()) { + result.append(":/MO/gui/edit_clear"); + } + return result; } @@ -1250,10 +1254,6 @@ bool PluginList::hasInfo(const ESPInfo& esp, const AdditionalInfo* info) const if (!info->loot.messages.empty()) { return true; } - - if (!info->loot.dirty.empty()) { - return true; - } } return false; diff --git a/src/version.rc b/src/version.rc index be73324c..983c1a8f 100644 --- a/src/version.rc +++ b/src/version.rc @@ -3,8 +3,8 @@ // If VS_FF_PRERELEASE is not set, MO labels the build as a release and uses VER_FILEVERSION to determine version number. // Otherwise, if letters are used in VER_FILEVERSION_STR, uses the full MOBase::VersionInfo parser // Otherwise, uses the numbers from VER_FILEVERSION and sets the release type as pre-alpha -#define VER_FILEVERSION 2,2,2,5 -#define VER_FILEVERSION_STR "2.2.2alpha5\0" +#define VER_FILEVERSION 2,2,2,7 +#define VER_FILEVERSION_STR "2.2.2alpha7\0" VS_VERSION_INFO VERSIONINFO FILEVERSION VER_FILEVERSION -- cgit v1.3.1