diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-09-19 11:23:21 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-09-19 11:23:21 -0400 |
| commit | a5db7ed864ac58657bf9bfbbc292cdccbeeaa38b (patch) | |
| tree | 546c849f8b7623e8639d02d468ad658c6a8c3918 /src/settings.cpp | |
| parent | 8bc67a86d64c86cf7f1eeb2c656dd414c0716d0b (diff) | |
added Settings::isExecutableBlacklisted()
moved blacklisted confirmation to dialogs
Diffstat (limited to 'src/settings.cpp')
| -rw-r--r-- | src/settings.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 7fdda2bf..ae487c18 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); |
