[decorations] Introduce logging category for decorations
This commit is contained in:
parent
910c49959a
commit
09880d1267
7 changed files with 56 additions and 6 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#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 <http://www.gnu.org/licenses/>.
|
|||
#include <KPluginLoader>
|
||||
|
||||
// Qt
|
||||
#include <QDebug>
|
||||
#include <QMetaProperty>
|
||||
#include <QPainter>
|
||||
|
||||
|
@ -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());
|
||||
|
|
|
@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*********************************************************************/
|
||||
|
||||
#include "decorationpalette.h"
|
||||
#include "decorations_logging.h"
|
||||
|
||||
#include <KConfigGroup>
|
||||
#include <KSharedConfig>
|
||||
|
@ -29,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <QPalette>
|
||||
#include <QFileInfo>
|
||||
#include <QStandardPaths>
|
||||
#include <QDebug>
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
21
decorations/decorations_logging.cpp
Normal file
21
decorations/decorations_logging.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
/********************************************************************
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
Copyright (C) 2015 Martin Gräßlin <mgraesslin@kde.org>
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "decorations_logging.h"
|
||||
Q_LOGGING_CATEGORY(KWIN_DECORATIONS, "kwin_decorations", QtCriticalMsg);
|
26
decorations/decorations_logging.h
Normal file
26
decorations/decorations_logging.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
/********************************************************************
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
Copyright (C) 2015 Martin Gräßlin <mgraesslin@kde.org>
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#ifndef KWIN_DECORATIONS_LOGGING_H
|
||||
#define KWIN_DECORATIONS_LOGGING_H
|
||||
#include <QDebug>
|
||||
#include <QLoggingCategory>
|
||||
Q_DECLARE_LOGGING_CATEGORY(KWIN_DECORATIONS)
|
||||
|
||||
#endif
|
|
@ -7,6 +7,7 @@ set(plugin_SRCS
|
|||
plugin.cpp
|
||||
buttonsmodel.cpp
|
||||
../../../decorations/decorationpalette.cpp
|
||||
../../../decorations/decorations_logging.cpp
|
||||
)
|
||||
|
||||
add_library(kdecorationprivatedeclarative SHARED ${plugin_SRCS})
|
||||
|
|
Loading…
Reference in a new issue