summaryrefslogtreecommitdiff
path: root/src/lootdialog.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-11-24 23:23:15 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2019-11-24 23:23:15 -0500
commit64304a6368cf8357bb04d1c0057aec637ebb479a (patch)
tree99556c89a6a480bf8684fba3eee705312cac37bb /src/lootdialog.cpp
parent70ee786102c8436c7f8f9e8a5d2ea71035d8d572 (diff)
tweaked css, finished markdown report
copy markdown.html to resources/
Diffstat (limited to 'src/lootdialog.cpp')
-rw-r--r--src/lootdialog.cpp44
1 files changed, 7 insertions, 37 deletions
diff --git a/src/lootdialog.cpp b/src/lootdialog.cpp
index 9c7b482e..c7cdfecd 100644
--- a/src/lootdialog.cpp
+++ b/src/lootdialog.cpp
@@ -226,49 +226,19 @@ void LootDialog::log(log::Levels lv, const QString& s)
void LootDialog::handleReport()
{
- const auto& report = m_loot.report();
+ const auto& lootReport = m_loot.report();
- if (!report.messages.empty()) {
+ if (!lootReport.messages.empty()) {
addLineOutput("");
}
- QString md;
-
- if (!report.messages.empty()) {
- for (auto&& m : report.messages) {
- log(m.type, m.text);
-
- md += " - ";
-
- switch (m.type)
- {
- case log::Error:
- {
- md += "**" + QObject::tr("Error") + "**: ";
- break;
- }
-
- case log::Warning:
- {
- md += "**" + QObject::tr("Warning") + "**: ";
- break;
- }
-
- default:
- {
- break;
- }
- }
-
- md += m.text + "\n";
- }
- } else {
- md += QObject::tr("**No messages.**");
+ for (auto&& m : lootReport.messages) {
+ log(m.type, m.text);
}
- m_report.setText(md);
-
- for (auto&& p : report.plugins) {
+ for (auto&& p : lootReport.plugins) {
m_core.pluginList()->addLootReport(p.name, p);
}
+
+ m_report.setText(lootReport.toMarkdown());
}