diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-12-17 06:32:08 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-12-17 06:32:08 -0500 |
| commit | ca6f9990c691a5d20e2b8d97ad98e4ad80c13a9e (patch) | |
| tree | 8b1b903e524d1747b8b2a26a94ba383ac7ab7d90 /src/lootdialog.cpp | |
| parent | c9d33dad4667e6087ced5155805e88984cc6b3fd (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.cpp | 18 |
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()); } |
