summaryrefslogtreecommitdiff
path: root/src/loot.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-11-18 13:32:33 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2019-11-18 13:32:33 -0500
commit27dadd016422765acb774ed2ed9ddae480eda46d (patch)
tree149ae11b02959f3e215840b5339902996f8c64aa /src/loot.h
parent1b6dc5e0a0ef365453abeaf52015d5eeeb6b7ae2 (diff)
<li> in tooltip for information messages
rewrote json output file handling to check for errors
Diffstat (limited to 'src/loot.h')
-rw-r--r--src/loot.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/loot.h b/src/loot.h
index 1f1c4353..11bb4987 100644
--- a/src/loot.h
+++ b/src/loot.h
@@ -1,9 +1,10 @@
#ifndef MODORGANIZER_LOOT_H
#define MODORGANIZER_LOOT_H
+#include "envmodule.h"
+#include <log.h>
#include <windows.h>
#include <QWidget>
-#include "envmodule.h"
class OrganizerCore;
@@ -39,8 +40,27 @@ private:
void lootThread();
bool waitForCompletion();
- void processOutputFile();
void processStdout(const std::string &lootOut);
+
+ void processOutputFile();
+ bool processOutputPlugin(const QJsonValue& pluginValue);
+
+ bool processPluginMessages(
+ const QString& pluginName, const QJsonObject& plugin);
+
+ bool processPluginMessage(
+ const QString& pluginName, const QJsonObject& message);
+
+ bool processPluginDirty(
+ const QString& pluginName, const QJsonObject& plugin);
+
+ template <class Format, class... Args>
+ void logJsonError(Format&& f, Args&&... args)
+ {
+ MOBase::log::error(
+ std::string("loot output file '{}': ") + f,
+ m_outPath, std::forward<Args>(args)...);
+ };
};