diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -13,6 +13,11 @@ kconfigwatcher.cpp ) +ecm_qt_declare_logging_category(libkconfigcore_SRCS + HEADER kconf_desktop_debug.h + IDENTIFIER KCONF_DESKTOP_LOG + CATEGORY_NAME kf5.kconfig.desktop) + configure_file(config-kconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kconfig.h ) add_library(KF5ConfigCore ${libkconfigcore_SRCS}) diff --git a/src/core/kdesktopfile.cpp b/src/core/kdesktopfile.cpp --- 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 "kconf_desktop_debug.h" class KDesktopFilePrivate : public KConfigPrivate { @@ -158,7 +159,7 @@ // 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(KCONF_DESKTOP_LOG) << "Access to '" << path << "' denied because of 'run_desktop_files' restriction." << endl; return false; } @@ -169,7 +170,7 @@ return true; } - qWarning() << "Access to '" << path << "' denied, not owned by root, executable flag not set." << endl; + qCWarning(KCONF_DESKTOP_LOG) << "Access to '" << path << "' denied, not owned by root, executable flag not set." << endl; return false; }