diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,13 +22,15 @@ include(ECMInstallIcons) include(ECMMarkAsTest) include(FeatureSummary) - +include(ECMQtDeclareLoggingCategory) add_subdirectory(icons) add_subdirectory(kcm) #add_subdirectory(plasma) 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) diff --git a/kcm/src/CMakeLists.txt b/kcm/src/CMakeLists.txt --- a/kcm/src/CMakeLists.txt +++ b/kcm/src/CMakeLists.txt @@ -2,14 +2,14 @@ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/declarative") + set(kcm_kscreen_SRCS declarative/qmloutput.cpp declarative/qmloutputcomponent.cpp declarative/qmlscreen.cpp collapsablebutton.cpp controlpanel.cpp - debug.cpp outputconfig.cpp primaryoutputcombo.cpp unifiedoutputconfig.cpp @@ -20,6 +20,9 @@ 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}) diff --git a/kcm/src/controlpanel.cpp b/kcm/src/controlpanel.cpp --- a/kcm/src/controlpanel.cpp +++ b/kcm/src/controlpanel.cpp @@ -22,7 +22,7 @@ #include "controlpanel.h" #include "outputconfig.h" #include "unifiedoutputconfig.h" -#include "debug.h" +#include "kcm_screen_debug.h" #include diff --git a/kcm/src/debug.h b/kcm/src/debug.h deleted file mode 100644 --- a/kcm/src/debug.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2016 Sebastian Kügler - * - * 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 -#include - -Q_DECLARE_LOGGING_CATEGORY(KSCREEN_KCM) - -#endif diff --git a/kcm/src/debug.cpp b/kcm/src/debug.cpp deleted file mode 100644 --- a/kcm/src/debug.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2016 Sebastian Kügler - * - * 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") diff --git a/kcm/src/kcm_kscreen.cpp b/kcm/src/kcm_kscreen.cpp --- a/kcm/src/kcm_kscreen.cpp +++ b/kcm/src/kcm_kscreen.cpp @@ -18,8 +18,9 @@ #include "kcm_kscreen.h" -#include "debug.h" +#include "kcm_screen_debug.h" #include "widget.h" +#include #include #include diff --git a/kcm/src/outputconfig.cpp b/kcm/src/outputconfig.cpp --- a/kcm/src/outputconfig.cpp +++ b/kcm/src/outputconfig.cpp @@ -23,7 +23,7 @@ #include "resolutionslider.h" #include "collapsablebutton.h" #include "utils.h" -#include "debug.h" +#include "kcm_screen_debug.h" #include #include diff --git a/kcm/src/unifiedoutputconfig.cpp b/kcm/src/unifiedoutputconfig.cpp --- a/kcm/src/unifiedoutputconfig.cpp +++ b/kcm/src/unifiedoutputconfig.cpp @@ -23,7 +23,7 @@ #include "collapsablebutton.h" #include "resolutionslider.h" #include "utils.h" -#include "debug.h" +#include "kcm_screen_debug.h" #include #include diff --git a/kded/CMakeLists.txt b/kded/CMakeLists.txt --- a/kded/CMakeLists.txt +++ b/kded/CMakeLists.txt @@ -3,13 +3,14 @@ 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) diff --git a/kded/daemon.cpp b/kded/daemon.cpp --- a/kded/daemon.cpp +++ b/kded/daemon.cpp @@ -22,7 +22,7 @@ #include "generator.h" #include "device.h" #include "kscreenadaptor.h" -#include "debug.h" +#include "kscreen_daemon_debug.h" #include #include @@ -34,6 +34,7 @@ #include #include +#include #include #include #include diff --git a/kded/debug.h b/kded/debug.h deleted file mode 100644 --- a/kded/debug.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2014 Daniel Vratil - * - * 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 -#include - -Q_DECLARE_LOGGING_CATEGORY(KSCREEN_KDED) - -#endif diff --git a/kded/debug.cpp b/kded/debug.cpp deleted file mode 100644 --- a/kded/debug.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2014 Daniel Vratil - * - * 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") diff --git a/kded/device.cpp b/kded/device.cpp --- a/kded/device.cpp +++ b/kded/device.cpp @@ -18,7 +18,7 @@ *************************************************************************************/ #include "device.h" -#include "debug.h" +#include "kscreen_daemon_debug.h" #include "kded/freedesktop_interface.h" #include diff --git a/kded/generator.cpp b/kded/generator.cpp --- a/kded/generator.cpp +++ b/kded/generator.cpp @@ -18,7 +18,7 @@ #include "generator.h" #include "device.h" -#include "debug.h" +#include "kscreen_daemon_debug.h" #include #include diff --git a/kded/serializer.cpp b/kded/serializer.cpp --- a/kded/serializer.cpp +++ b/kded/serializer.cpp @@ -17,7 +17,7 @@ *************************************************************************************/ #include "serializer.h" -#include "debug.h" +#include "kscreen_daemon_debug.h" #include "generator.h" #include diff --git a/kscreen.categories b/kscreen.categories new file mode 100644 --- /dev/null +++ b/kscreen.categories @@ -0,0 +1,2 @@ +kscreen.kded kscreen kded (kscreen) +kscreen.kcm kscreen kcm (kscreen) diff --git a/tests/kded/CMakeLists.txt b/tests/kded/CMakeLists.txt --- a/tests/kded/CMakeLists.txt +++ b/tests/kded/CMakeLists.txt @@ -7,10 +7,10 @@ ${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