From 27dadd016422765acb774ed2ed9ddae480eda46d Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Mon, 18 Nov 2019 13:32:33 -0500 Subject:
  • in tooltip for information messages rewrote json output file handling to check for errors --- src/loot.h | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'src/loot.h') 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 #include #include -#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 + void logJsonError(Format&& f, Args&&... args) + { + MOBase::log::error( + std::string("loot output file '{}': ") + f, + m_outPath, std::forward(args)...); + }; }; -- cgit v1.3.1