diff options
author | Méven Car <meven29@gmail.com> | 2019-08-14 16:27:31 +0200 |
---|---|---|
committer | Méven Car <meven29@gmail.com> | 2019-08-14 17:25:59 +0200 |
commit | 403c617eea56cc7581ee348e53d41eb4d291ba29 (patch) | |
tree | 303e9b5f24d59356d493045948bb1d5a0455e61a /src/core/kdesktopfile.cpp | |
parent | 2de9e4fc165bcadd54f81b7d17904c45632705f5 (diff) | |
download | kconfig-403c617eea56cc7581ee348e53d41eb4d291ba29.tar.gz kconfig-403c617eea56cc7581ee348e53d41eb4d291ba29.tar.bz2 |
Add a logging category for logs warnings
Summary: Disable logs unless the logging category kf5.kconfig.core is enabled
Test Plan: ctest
Reviewers: #frameworks, apol, cgiboudeaux
Reviewed By: cgiboudeaux
Subscribers: cgiboudeaux, mikeroyal, apol, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D22061
Diffstat (limited to 'src/core/kdesktopfile.cpp')
-rw-r--r-- | src/core/kdesktopfile.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/kdesktopfile.cpp b/src/core/kdesktopfile.cpp index d9283cef..367a7d8b 100644 --- a/src/core/kdesktopfile.cpp +++ b/src/core/kdesktopfile.cpp @@ -34,6 +34,7 @@ #include "kconfig_p.h" #include "kconfiggroup.h" #include "kconfigini_p.h" +#include "kconfig_core_log_settings.h" class KDesktopFilePrivate : public KConfigPrivate { @@ -158,7 +159,7 @@ bool KDesktopFile::isAuthorizedDesktopFile(const QString &path) // Forbid desktop files outside of standard locations if kiosk is set so if (!KAuthorized::authorize(QStringLiteral("run_desktop_files"))) { - qWarning() << "Access to '" << path << "' denied because of 'run_desktop_files' restriction." << endl; + qCWarning(KCONFIG_CORE_LOG) << "Access to '" << path << "' denied because of 'run_desktop_files' restriction." << endl; return false; } @@ -169,7 +170,7 @@ bool KDesktopFile::isAuthorizedDesktopFile(const QString &path) return true; } - qWarning() << "Access to '" << path << "' denied, not owned by root, executable flag not set." << endl; + qCWarning(KCONFIG_CORE_LOG) << "Access to '" << path << "' denied, not owned by root, executable flag not set." << endl; return false; } |