diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-09-22 15:14:53 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-22 15:14:53 -0400 |
| commit | 5044a6cd2c7d75e2505e5abc6645fc990f343dc9 (patch) | |
| tree | e06b037a1d44876a895fd5ecc47071477e52101b /src/settings.cpp | |
| parent | f69559fe0bd40629e66ecde6e362b73595d9bd2e (diff) | |
| parent | c1a5f2ef73f4435c08876155d4551c045d5e7594 (diff) | |
Merge pull request #839 from isanae/even-more-logging
Even more logging
Diffstat (limited to 'src/settings.cpp')
| -rw-r--r-- | src/settings.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 1f066100..7cea52fb 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -222,6 +222,17 @@ QString Settings::executablesBlacklist() const return get<QString>(m_Settings, "Settings", "executable_blacklist", def); } +bool Settings::isExecutableBlacklisted(const QString& s) const +{ + for (auto exec : executablesBlacklist().split(";")) { + if (exec.compare(s, Qt::CaseInsensitive) == 0) { + return true; + } + } + + return false; +} + void Settings::setExecutablesBlacklist(const QString& s) { set(m_Settings, "Settings", "executable_blacklist", s); @@ -935,7 +946,7 @@ QuestionBoxMemory::Button WidgetSettings::questionButton( if (!filename.isEmpty()) { const auto fileSetting = windowName + "/" + filename; - if (auto v=getOptional<int>(m_Settings, sectionName, filename)) { + if (auto v=getOptional<int>(m_Settings, sectionName, fileSetting)) { return static_cast<QuestionBoxMemory::Button>(*v); } } @@ -1219,6 +1230,7 @@ void PluginSettings::setPersistent( m_Settings.sync(); } } + void PluginSettings::addBlacklist(const QString &fileName) { m_PluginBlacklist.insert(fileName); |
