summaryrefslogtreecommitdiff
path: root/src/lootdialog.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-12-17 06:32:08 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2019-12-17 06:32:08 -0500
commitca6f9990c691a5d20e2b8d97ad98e4ad80c13a9e (patch)
tree8b1b903e524d1747b8b2a26a94ba383ac7ab7d90 /src/lootdialog.cpp
parentc9d33dad4667e6087ced5155805e88984cc6b3fd (diff)
added text in when running loot
stop indeterminate progress bar on errors add errors and warnings to report
Diffstat (limited to 'src/lootdialog.cpp')
-rw-r--r--src/lootdialog.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/lootdialog.cpp b/src/lootdialog.cpp
index ae3b1164..5ac65907 100644
--- a/src/lootdialog.cpp
+++ b/src/lootdialog.cpp
@@ -212,6 +212,8 @@ void LootDialog::createUI()
ui->buttons->setStandardButtons(QDialogButtonBox::Cancel);
+ m_report.setText(tr("Running LOOT..."));
+
resize(650, 450);
}
@@ -243,9 +245,15 @@ void LootDialog::onFinished()
close();
} else {
log::debug("loot dialog: showing report");
+
showReport();
+
ui->openJsonReport->setEnabled(true);
ui->buttons->setStandardButtons(QDialogButtonBox::Close);
+
+ // if loot failed, the Done progress won't be received; this makes sure
+ // the progress bar is stopped
+ setProgress(lootcli::Progress::Done);
}
}
@@ -262,16 +270,14 @@ void LootDialog::log(log::Levels lv, const QString& s)
void LootDialog::showReport()
{
- if (m_loot.result()) {
- const auto& lootReport = m_loot.report();
+ const auto& lootReport = m_loot.report();
+ if (m_loot.result()) {
m_core.pluginList()->clearAdditionalInformation();
for (auto&& p : lootReport.plugins) {
m_core.pluginList()->addLootReport(p.name, p);
}
-
- m_report.setText(lootReport.toMarkdown());
- } else {
- m_report.setText("**" + tr("Loot failed to run") + "**");
}
+
+ m_report.setText(lootReport.toMarkdown());
}