From eb190380e3044900a30ba41c81a23d813fd708e9 Mon Sep 17 00:00:00 2001
From: isanae <14251494+isanae@users.noreply.github.com>
Date: Wed, 17 Jul 2019 12:15:08 -0400
Subject: dump executables on startup
---
src/executableslist.cpp | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
(limited to 'src/executableslist.cpp')
diff --git a/src/executableslist.cpp b/src/executableslist.cpp
index 077d2a93..0ca880cd 100644
--- a/src/executableslist.cpp
+++ b/src/executableslist.cpp
@@ -21,6 +21,7 @@ along with Mod Organizer. If not, see .
#include "iplugingame.h"
#include "utility.h"
+#include
#include
#include
@@ -65,7 +66,7 @@ bool ExecutablesList::empty() const
void ExecutablesList::load(const MOBase::IPluginGame* game, QSettings& settings)
{
- qDebug("setting up configured executables");
+ log::debug("loading executables");
m_Executables.clear();
@@ -103,6 +104,8 @@ void ExecutablesList::load(const MOBase::IPluginGame* game, QSettings& settings)
if (needsUpgrade)
upgradeFromCustom(game);
+
+ dump();
}
void ExecutablesList::store(QSettings& settings)
@@ -332,6 +335,31 @@ void ExecutablesList::upgradeFromCustom(MOBase::IPluginGame const *game)
}
}
+void ExecutablesList::dump() const
+{
+ for (const auto& e : m_Executables) {
+ QStringList flags;
+
+ if (e.flags() & Executable::ShowInToolbar) {
+ flags.push_back("toolbar");
+ }
+
+ if (e.flags() & Executable::UseApplicationIcon) {
+ flags.push_back("icon");
+ }
+
+ log::debug(
+ " . executable '{}'\n"
+ " binary: {}\n"
+ " arguments: {}\n"
+ " steam ID: {}\n"
+ " directory: {}\n"
+ " flags: {} ({})",
+ e.title(), e.binaryInfo().absoluteFilePath(), e.arguments(),
+ e.steamAppID(), e.workingDirectory(), flags.join("|"), e.flags());
+ }
+}
+
Executable::Executable(QString title)
: m_title(title)
--
cgit v1.3.1