diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-07-17 12:15:08 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-07-22 07:33:38 -0400 |
| commit | eb190380e3044900a30ba41c81a23d813fd708e9 (patch) | |
| tree | 78518d401f46a182a4c5431ec07a8f5854951868 /src/main.cpp | |
| parent | 28c46eed919cf3044147f642ea0a8d9909fea2ea (diff) | |
dump executables on startup
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/src/main.cpp b/src/main.cpp index b89e4a80..6b4280b4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -503,6 +503,27 @@ void dumpEnvironment() } } +void dumpSettings(QSettings& settings) +{ + static QStringList ignore({ + "username", "password", "nexus_api_key" + }); + + log::debug("settings:"); + + settings.beginGroup("Settings"); + + for (auto k : settings.allKeys()) { + if (ignore.contains(k, Qt::CaseInsensitive)) { + continue; + } + + log::debug(" . {}={}", k, settings.value(k).toString()); + } + + settings.endGroup(); +} + int runApplication(MOApplication &application, SingleInstance &instance, const QString &splashPath) { @@ -538,22 +559,12 @@ int runApplication(MOApplication &application, SingleInstance &instance, Settings settings(initSettings); log::getDefault().setLevel(settings.logLevel()); - dumpEnvironment(); - // global crashDumpType sits in OrganizerCore to make a bit less ugly to // update it when the settings are changed during runtime OrganizerCore::setGlobalCrashDumpsType(settings.crashDumpsType()); - log::debug("Loaded settings:"); - - initSettings.beginGroup("Settings"); - for (auto k : initSettings.allKeys()) { - if (!k.contains("username") && !k.contains("password") && !k.contains("nexus_api_key")) { - log::debug(" {}={}", k, initSettings.value(k).toString()); - } - } - initSettings.endGroup(); - + dumpEnvironment(); + dumpSettings(initSettings); log::debug("initializing core"); OrganizerCore organizer(settings); |
