Commit a87cec0b authored by Laurent Montel's avatar Laurent Montel 😁

Port to autogenerate logging category

Summary: Auto generate logging category

Test Plan: build/test in kdebugsettings

Reviewers: afiestas, sebas, davidedmundson

Reviewed By: davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D8431
parent c2f85dd2
......@@ -22,7 +22,7 @@ include(KDECMakeSettings)
include(ECMInstallIcons)
include(ECMMarkAsTest)
include(FeatureSummary)
include(ECMQtDeclareLoggingCategory)
add_subdirectory(icons)
add_subdirectory(kcm)
......@@ -31,4 +31,6 @@ add_subdirectory(kded)
add_subdirectory(tests)
add_subdirectory(console)
install( FILES kscreen.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
......@@ -2,6 +2,7 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kcm_displayconfiguration\")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/declarative")
set(kcm_kscreen_SRCS
declarative/qmloutput.cpp
declarative/qmloutputcomponent.cpp
......@@ -9,7 +10,6 @@ set(kcm_kscreen_SRCS
collapsablebutton.cpp
controlpanel.cpp
debug.cpp
outputconfig.cpp
primaryoutputcombo.cpp
unifiedoutputconfig.cpp
......@@ -20,6 +20,9 @@ set(kcm_kscreen_SRCS
scalingconfig.cpp
)
ecm_qt_declare_logging_category(kcm_kscreen_SRCS HEADER kcm_screen_debug.h IDENTIFIER KSCREEN_KCM CATEGORY_NAME kscreen.kcm)
ki18n_wrap_ui(kcm_kscreen_SRCS stylepreview.ui scaling.ui)
add_library(kcm_kscreen MODULE kcm_kscreen.cpp ${kcm_kscreen_SRCS})
......
......@@ -22,7 +22,7 @@
#include "controlpanel.h"
#include "outputconfig.h"
#include "unifiedoutputconfig.h"
#include "debug.h"
#include "kcm_screen_debug.h"
#include <QVBoxLayout>
......
/*
* Copyright 2016 Sebastian Kügler <sebas@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "debug.h"
Q_LOGGING_CATEGORY(KSCREEN_KCM, "kscreen.kcm")
/*
* Copyright 2016 Sebastian Kügler <sebas@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef KSCREEN_KCM_DEBUG_H
#define KSCREEN_KCM_DEBUG_H
#include <QLoggingCategory>
#include <KScreen/Log>
Q_DECLARE_LOGGING_CATEGORY(KSCREEN_KCM)
#endif
......@@ -18,8 +18,9 @@
#include "kcm_kscreen.h"
#include "debug.h"
#include "kcm_screen_debug.h"
#include "widget.h"
#include <kscreen/log.h>
#include <KPluginFactory>
#include <KAboutData>
......
......@@ -23,7 +23,7 @@
#include "resolutionslider.h"
#include "collapsablebutton.h"
#include "utils.h"
#include "debug.h"
#include "kcm_screen_debug.h"
#include <QtCore/QStringBuilder>
#include <QFormLayout>
......
......@@ -23,7 +23,7 @@
#include "collapsablebutton.h"
#include "resolutionslider.h"
#include "utils.h"
#include "debug.h"
#include "kcm_screen_debug.h"
#include <QComboBox>
#include <QIcon>
......
......@@ -3,13 +3,14 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kscreen\")
include_directories(${CMAKE_CURRENT_BINARY_DIR}/../)
set(kscreen_daemon_SRCS
debug.cpp
daemon.cpp
serializer.cpp
generator.cpp
device.cpp
)
ecm_qt_declare_logging_category(kscreen_daemon_SRCS HEADER kscreen_daemon_debug.h IDENTIFIER KSCREEN_KDED CATEGORY_NAME kscreen.kded)
qt5_add_dbus_interface(kscreen_daemon_SRCS
org.freedesktop.DBus.Properties.xml
freedesktop_interface)
......
......@@ -22,7 +22,7 @@
#include "generator.h"
#include "device.h"
#include "kscreenadaptor.h"
#include "debug.h"
#include "kscreen_daemon_debug.h"
#include <QTimer>
#include <QAction>
......@@ -34,6 +34,7 @@
#include <KPluginFactory>
#include <KGlobalAccel>
#include <kscreen/log.h>
#include <kscreen/config.h>
#include <kscreen/output.h>
#include <kscreen/configmonitor.h>
......
/*
* Copyright (C) 2014 Daniel Vratil <dvratil@redhat.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "debug.h"
Q_LOGGING_CATEGORY(KSCREEN_KDED, "kscreen.kded")
/*
* Copyright (C) 2014 Daniel Vratil <dvratil@redhat.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef KDED_DEBUG_H
#define KDED_DEBUG_H
#include <QLoggingCategory>
#include <kscreen/log.h>
Q_DECLARE_LOGGING_CATEGORY(KSCREEN_KDED)
#endif
......@@ -18,7 +18,7 @@
*************************************************************************************/
#include "device.h"
#include "debug.h"
#include "kscreen_daemon_debug.h"
#include "kded/freedesktop_interface.h"
#include <QLoggingCategory>
......
......@@ -18,7 +18,7 @@
#include "generator.h"
#include "device.h"
#include "debug.h"
#include "kscreen_daemon_debug.h"
#include <QDBusReply>
#include <QDBusMessage>
......
......@@ -17,7 +17,7 @@
*************************************************************************************/
#include "serializer.h"
#include "debug.h"
#include "kscreen_daemon_debug.h"
#include "generator.h"
#include <QStringList>
......
kscreen.kded kscreen kded (kscreen)
kscreen.kcm kscreen kcm (kscreen)
......@@ -7,10 +7,10 @@ macro(ADD_KDED_TEST testname)
${testname}.cpp
${CMAKE_SOURCE_DIR}/kded/generator.cpp
${CMAKE_SOURCE_DIR}/kded/device.cpp
${CMAKE_SOURCE_DIR}/kded/debug.cpp
${CMAKE_SOURCE_DIR}/kded/serializer.cpp
#${CMAKE_SOURCE_DIR}/kded/daemon.cpp
)
ecm_qt_declare_logging_category(test_SRCS HEADER kscreen_daemon_debug.h IDENTIFIER KSCREEN_KDED CATEGORY_NAME kscreen.kded)
qt5_add_dbus_interface(test_SRCS
${CMAKE_SOURCE_DIR}/kded/org.freedesktop.DBus.Properties.xml
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment