diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-09-02 16:09:31 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-09-02 16:09:31 -0400 |
| commit | 7f0fa1069f07d90a92be7073b11bab86bac7b2d2 (patch) | |
| tree | 0ee51756f13b2b84d2d542c86a3a6f11fe11cd06 /src/settingsutilities.cpp | |
| parent | 209c27c7a27e2f6cb34f122a929c15eb3d1e60b7 (diff) | |
don't log widget and geometry setting changes
fixed mod info dialog tab order using different settings for read and write
mod info dialog now doesn't complain when no tab order exists in the settings
only remove section when the array is larger, prevents logging changes when nothing actually changed
Diffstat (limited to 'src/settingsutilities.cpp')
| -rw-r--r-- | src/settingsutilities.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/settingsutilities.cpp b/src/settingsutilities.cpp index d5e2dd9a..7a9dcc35 100644 --- a/src/settingsutilities.cpp +++ b/src/settingsutilities.cpp @@ -4,8 +4,26 @@ using namespace MOBase; +bool shouldLogSetting(const QString& displayName) +{ + // don't log Geometry/ and Widgets/, too noisy and not very useful + static const QStringList ignorePrefixes = {"Geometry/", "Widgets/"}; + + for (auto&& prefix : ignorePrefixes) { + if (displayName.startsWith(prefix, Qt::CaseInsensitive)) { + return false; + } + } + + return true; +} + void logRemoval(const QString& name) { + if (!shouldLogSetting(name)) { + return; + } + log::debug("setting '{}' removed", name); } |
