diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf6bf0e8b5..450a1d4fa3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -405,6 +405,7 @@ set(kwin_KDEINIT_SRCS
decorations/decorationpalette.cpp
decorations/settings.cpp
decorations/decorationrenderer.cpp
+ decorations/decorations_logging.cpp
)
if(KWIN_BUILD_TABBOX)
diff --git a/data/org_kde_kwin.categories b/data/org_kde_kwin.categories
index 3d81c92ee4..107d59cbde 100644
--- a/data/org_kde_kwin.categories
+++ b/data/org_kde_kwin.categories
@@ -10,4 +10,5 @@ kwin_wayland_backend KWin Wayland (Wayland backend)
kwin_wayland_x11windowed KWin Wayland (X11 backend)
kwin_libinput KWin Libinput Integration
kwin_tabbox KWin Window Switcher
+kwin_decorations KWin Decorations
aurorae KWin Aurorae Window Decoration Engine
diff --git a/decorations/decorationbridge.cpp b/decorations/decorationbridge.cpp
index e7296975c9..3795cb7c78 100644
--- a/decorations/decorationbridge.cpp
+++ b/decorations/decorationbridge.cpp
@@ -20,6 +20,7 @@ along with this program. If not, see .
#include "decorationbridge.h"
#include "decoratedclient.h"
#include "decorationrenderer.h"
+#include "decorations_logging.h"
#include "settings.h"
// KWin core
#include "client.h"
@@ -37,7 +38,6 @@ along with this program. If not, see .
#include
// Qt
-#include
#include
#include
@@ -97,14 +97,14 @@ void DecorationBridge::initPlugin()
{
const auto offers = KPluginLoader::findPluginsById(s_pluginName, m_plugin);
if (offers.isEmpty()) {
- qWarning() << "Could not locate decoration plugin";
+ qCWarning(KWIN_DECORATIONS) << "Could not locate decoration plugin";
return;
}
- qDebug() << "Trying to load decoration plugin: " << offers.first().fileName();
+ qCDebug(KWIN_DECORATIONS) << "Trying to load decoration plugin: " << offers.first().fileName();
KPluginLoader loader(offers.first().fileName());
KPluginFactory *factory = loader.factory();
if (!factory) {
- qWarning() << "Error loading plugin:" << loader.errorString();
+ qCWarning(KWIN_DECORATIONS) << "Error loading plugin:" << loader.errorString();
} else {
m_factory = factory;
loadMetaData(loader.metaData().value(QStringLiteral("MetaData")).toObject());
diff --git a/decorations/decorationpalette.cpp b/decorations/decorationpalette.cpp
index 7552c79ccb..e37eeaf88f 100644
--- a/decorations/decorationpalette.cpp
+++ b/decorations/decorationpalette.cpp
@@ -21,6 +21,7 @@ along with this program. If not, see .
*********************************************************************/
#include "decorationpalette.h"
+#include "decorations_logging.h"
#include
#include
@@ -29,7 +30,6 @@ along with this program. If not, see .
#include
#include
#include
-#include
namespace KWin
{
@@ -116,7 +116,7 @@ void DecorationPalette::update()
KConfigGroup wmConfig(config, QStringLiteral("WM"));
if (!wmConfig.exists() && !m_colorScheme.endsWith(QStringLiteral("/kdeglobals"))) {
- qWarning() << "Invalid color scheme" << m_colorScheme << "lacks WM group";
+ qCWarning(KWIN_DECORATIONS) << "Invalid color scheme" << m_colorScheme << "lacks WM group";
return;
}
diff --git a/decorations/decorations_logging.cpp b/decorations/decorations_logging.cpp
new file mode 100644
index 0000000000..fb7cd66fc1
--- /dev/null
+++ b/decorations/decorations_logging.cpp
@@ -0,0 +1,21 @@
+/********************************************************************
+ KWin - the KDE window manager
+ This file is part of the KDE project.
+
+Copyright (C) 2015 Martin Gräßlin
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*********************************************************************/
+#include "decorations_logging.h"
+Q_LOGGING_CATEGORY(KWIN_DECORATIONS, "kwin_decorations", QtCriticalMsg);
diff --git a/decorations/decorations_logging.h b/decorations/decorations_logging.h
new file mode 100644
index 0000000000..3210b04143
--- /dev/null
+++ b/decorations/decorations_logging.h
@@ -0,0 +1,26 @@
+/********************************************************************
+ KWin - the KDE window manager
+ This file is part of the KDE project.
+
+Copyright (C) 2015 Martin Gräßlin
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*********************************************************************/
+#ifndef KWIN_DECORATIONS_LOGGING_H
+#define KWIN_DECORATIONS_LOGGING_H
+#include
+#include
+Q_DECLARE_LOGGING_CATEGORY(KWIN_DECORATIONS)
+
+#endif
diff --git a/kcmkwin/kwindecoration/declarative-plugin/CMakeLists.txt b/kcmkwin/kwindecoration/declarative-plugin/CMakeLists.txt
index 701057fa30..1b0abc5b51 100644
--- a/kcmkwin/kwindecoration/declarative-plugin/CMakeLists.txt
+++ b/kcmkwin/kwindecoration/declarative-plugin/CMakeLists.txt
@@ -7,6 +7,7 @@ set(plugin_SRCS
plugin.cpp
buttonsmodel.cpp
../../../decorations/decorationpalette.cpp
+ ../../../decorations/decorations_logging.cpp
)
add_library(kdecorationprivatedeclarative SHARED ${plugin_SRCS})