aboutsummaryrefslogtreecommitdiff
path: root/src/core/kconfig.cpp
diff options
context:
space:
mode:
authorMéven Car <meven29@gmail.com>2019-08-14 16:27:31 +0200
committerMéven Car <meven29@gmail.com>2019-08-14 17:25:59 +0200
commit403c617eea56cc7581ee348e53d41eb4d291ba29 (patch)
tree303e9b5f24d59356d493045948bb1d5a0455e61a /src/core/kconfig.cpp
parent2de9e4fc165bcadd54f81b7d17904c45632705f5 (diff)
downloadkconfig-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/kconfig.cpp')
-rw-r--r--src/core/kconfig.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/kconfig.cpp b/src/core/kconfig.cpp
index f6824ce6..9f294209 100644
--- a/src/core/kconfig.cpp
+++ b/src/core/kconfig.cpp
@@ -24,6 +24,7 @@
#include "kconfig_p.h"
#include "config-kconfig.h"
+#include "kconfig_core_log_settings.h"
#include <cstdlib>
#include <fcntl.h>
@@ -408,7 +409,7 @@ bool KConfig::sync()
// lock the local file
if (d->configState == ReadWrite && !d->lockLocal()) {
- qWarning() << "couldn't lock local file";
+ qCWarning(KCONFIG_CORE_LOG) << "couldn't lock local file";
return false;
}
@@ -438,7 +439,7 @@ bool KConfig::sync()
if (d->wantGlobals() && writeGlobals) {
QExplicitlySharedDataPointer<KConfigBackend> tmp = KConfigBackend::create(*sGlobalFileName);
if (d->configState == ReadWrite && !tmp->lock()) {
- qWarning() << "couldn't lock global file";
+ qCWarning(KCONFIG_CORE_LOG) << "couldn't lock global file";
//unlock the local config if we're returning early
if (d->mBackend->isLocked()) {