summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-10-10 21:46:53 +0200
committerLaurent Montel <[email protected]>2018-10-10 21:46:53 +0200
commit0f328f26d254cfb051535e7813104cc36a5e46a2 (patch)
tree4f7ce4d2695af58657907fd1600be361282d56d2
parent66a0c467dd5109eca0f70584cfe278a0979c0d1d (diff)
Autogenerate debug categories + create categories file
-rw-r--r--CMakeLists.txt12
-rw-r--r--kscreen.categories3
-rw-r--r--src/CMakeLists.txt14
-rw-r--r--src/backendlauncher/CMakeLists.txt4
-rw-r--r--src/backendlauncher/backenddbuswrapper.cpp2
-rw-r--r--src/backendlauncher/backendloader.cpp2
-rw-r--r--src/backendlauncher/main.cpp2
-rw-r--r--src/backendmanager.cpp2
-rw-r--r--src/config.cpp2
-rw-r--r--src/configmonitor.cpp2
-rw-r--r--src/configoperation.cpp2
-rw-r--r--src/configserializer.cpp2
-rw-r--r--src/debug_p.cpp24
-rw-r--r--src/debug_p.h27
-rw-r--r--src/edid.cpp2
-rw-r--r--src/output.cpp2
-rw-r--r--src/setconfigoperation.cpp2
17 files changed, 31 insertions, 75 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a54349a..425abea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,16 +38,6 @@ set_package_properties(XCB PROPERTIES
option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF)
add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)")
-# library setup
-
-add_definitions(
- -DQT_USE_QSTRINGBUILDER
- -DQT_NO_CAST_TO_ASCII
- -DQT_NO_CAST_FROM_ASCII
- -DQT_STRICT_ITERATORS
- -DQT_NO_URL_CAST_FROM_STRING
- -DQT_NO_CAST_FROM_BYTEARRAY
-)
set(KF5_VERSION ${PROJECT_VERSION}) #When we are happy with the api, we can sync with frameworks
ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KSCREEN
@@ -109,5 +99,7 @@ install(FILES
DESTINATION "${KF5_INCLUDE_INSTALL_DIR}"
COMPONENT Devel
)
+install( FILES kscreen.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
+
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff --git a/kscreen.categories b/kscreen.categories
new file mode 100644
index 0000000..02edcea
--- /dev/null
+++ b/kscreen.categories
@@ -0,0 +1,3 @@
+org.kde.kscreen kscreen IDENTIFIER [KSCREEN]
+org.kde.kscreen.edid kscreen (edid) IDENTIFIER [KSCREEN_EDID]
+org.kde.kscreen.backendLauncher kscreen (backendlauncher) IDENTIFIER [KSCREEN_BACKEND_LAUNCHER]
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5718cf1..f046b54 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -15,12 +15,24 @@ set(libkscreen_SRCS
output.cpp
edid.cpp
mode.cpp
- debug_p.cpp
log.cpp
)
qt5_add_dbus_interface(libkscreen_SRCS ${CMAKE_SOURCE_DIR}/interfaces/org.kde.KScreen.Backend.xml backendinterface)
+ecm_qt_declare_logging_category(libkscreen_SRCS
+ HEADER kscreen_debug.h
+ IDENTIFIER KSCREEN
+ CATEGORY_NAME org.kde.kscreen
+)
+
+ecm_qt_declare_logging_category(libkscreen_SRCS
+ HEADER kscreen_debug_edid.h
+ IDENTIFIER KSCREEN_EDID
+ CATEGORY_NAME org.kde.kscreen.edid
+)
+
+
add_library(KF5Screen SHARED ${libkscreen_SRCS})
generate_export_header(KF5Screen BASE_NAME KScreen)
diff --git a/src/backendlauncher/CMakeLists.txt b/src/backendlauncher/CMakeLists.txt
index e031a89..e1c2002 100644
--- a/src/backendlauncher/CMakeLists.txt
+++ b/src/backendlauncher/CMakeLists.txt
@@ -10,9 +10,9 @@ set(backendlauncher_SRCS
)
ecm_qt_declare_logging_category(backendlauncher_SRCS
- HEADER debug_p.h
+ HEADER kscreen_backendLauncher_debug.h
IDENTIFIER KSCREEN_BACKEND_LAUNCHER
- CATEGORY_NAME kscreen.backendLauncher
+ CATEGORY_NAME org.kde.kscreen.backendLauncher
)
qt5_add_dbus_adaptor(backendlauncher_SRCS ${CMAKE_SOURCE_DIR}/interfaces/org.kde.KScreen.Backend.xml
diff --git a/src/backendlauncher/backenddbuswrapper.cpp b/src/backendlauncher/backenddbuswrapper.cpp
index c5fda0a..1f7ede5 100644
--- a/src/backendlauncher/backenddbuswrapper.cpp
+++ b/src/backendlauncher/backenddbuswrapper.cpp
@@ -20,7 +20,7 @@
#include "backenddbuswrapper.h"
#include "backendloader.h"
#include "backendadaptor.h"
-#include "debug_p.h"
+#include "kscreen_backendLauncher_debug.h"
#include "src/configserializer_p.h"
#include "src/config.h"
diff --git a/src/backendlauncher/backendloader.cpp b/src/backendlauncher/backendloader.cpp
index 40f854d..a83e151 100644
--- a/src/backendlauncher/backendloader.cpp
+++ b/src/backendlauncher/backendloader.cpp
@@ -20,7 +20,7 @@
#include "backendloader.h"
#include "backendloaderadaptor.h"
#include "backenddbuswrapper.h"
-#include "debug_p.h"
+#include "kscreen_backendLauncher_debug.h"
#include "src/abstractbackend.h"
#include "src/backendmanager_p.h"
diff --git a/src/backendlauncher/main.cpp b/src/backendlauncher/main.cpp
index b891498..d8b74c5 100644
--- a/src/backendlauncher/main.cpp
+++ b/src/backendlauncher/main.cpp
@@ -20,7 +20,7 @@
#include <QGuiApplication>
#include <QDBusConnection>
-#include "debug_p.h"
+#include "kscreen_backendLauncher_debug.h"
#include "backendloader.h"
#include "log.h"
diff --git a/src/backendmanager.cpp b/src/backendmanager.cpp
index 6785eb9..2c70b0e 100644
--- a/src/backendmanager.cpp
+++ b/src/backendmanager.cpp
@@ -25,7 +25,7 @@
#include "config.h"
#include "configmonitor.h"
#include "backendinterface.h"
-#include "debug_p.h"
+#include "kscreen_debug.h"
#include "getconfigoperation.h"
#include "configserializer_p.h"
#include "log.h"
diff --git a/src/config.cpp b/src/config.cpp
index 19a35da..7988ff4 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -21,7 +21,7 @@
#include "output.h"
#include "backendmanager_p.h"
#include "abstractbackend.h"
-#include "debug_p.h"
+#include "kscreen_debug.h"
#include <QDebug>
#include <QRect>
diff --git a/src/configmonitor.cpp b/src/configmonitor.cpp
index 0aa9211..6a95bec 100644
--- a/src/configmonitor.cpp
+++ b/src/configmonitor.cpp
@@ -22,7 +22,7 @@
#include "abstractbackend.h"
#include "configserializer_p.h"
#include "getconfigoperation.h"
-#include "debug_p.h"
+#include "kscreen_debug.h"
#include "output.h"
#include <QDBusPendingCallWatcher>
diff --git a/src/configoperation.cpp b/src/configoperation.cpp
index 7755904..6342a5f 100644
--- a/src/configoperation.cpp
+++ b/src/configoperation.cpp
@@ -22,7 +22,7 @@
#include "configoperation_p.h"
#include "backendmanager_p.h"
-#include "debug_p.h"
+#include "kscreen_debug.h"
using namespace KScreen;
diff --git a/src/configserializer.cpp b/src/configserializer.cpp
index 70148a2..f5c7145 100644
--- a/src/configserializer.cpp
+++ b/src/configserializer.cpp
@@ -24,7 +24,7 @@
#include "output.h"
#include "screen.h"
#include "edid.h"
-#include "debug_p.h"
+#include "kscreen_debug.h"
#include <QDBusArgument>
#include <QJsonDocument>
diff --git a/src/debug_p.cpp b/src/debug_p.cpp
deleted file mode 100644
index c5e41dd..0000000
--- a/src/debug_p.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/*************************************************************************************
- * Copyright (C) 2014 by Alejandro Fiestas Olivares <[email protected]> *
- * *
- * 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 St, Fifth Floor, Boston, MA 02110-1301 USA *
- *************************************************************************************/
-
-#include "debug_p.h"
-#include <QString>
-#include <QCoreApplication>
-
-Q_LOGGING_CATEGORY(KSCREEN, "kscreen")
-Q_LOGGING_CATEGORY(KSCREEN_EDID, "kscreen.edid")
diff --git a/src/debug_p.h b/src/debug_p.h
deleted file mode 100644
index ec00f0a..0000000
--- a/src/debug_p.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*************************************************************************************
- * Copyright (C) 2014 by Alejandro Fiestas Olivares <[email protected]> *
- * *
- * 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 St, Fifth Floor, Boston, MA 02110-1301 USA *
- *************************************************************************************/
-
-#ifndef SCREEN_DEBUG_P_H
-#define SCREEN_DEBUG_P_H
-
-#include <QLoggingCategory>
-
-Q_DECLARE_LOGGING_CATEGORY(KSCREEN)
-Q_DECLARE_LOGGING_CATEGORY(KSCREEN_EDID)
-
-#endif //SCREEN_DEBUG_P_H
diff --git a/src/edid.cpp b/src/edid.cpp
index 8b4b017..36821c7 100644
--- a/src/edid.cpp
+++ b/src/edid.cpp
@@ -18,7 +18,7 @@
*************************************************************************************/
#include "edid.h"
-#include "debug_p.h"
+#include "kscreen_debug_edid.h"
#include <math.h>
diff --git a/src/output.cpp b/src/output.cpp
index c36c3ef..56a062d 100644
--- a/src/output.cpp
+++ b/src/output.cpp
@@ -22,7 +22,7 @@
#include "edid.h"
#include "abstractbackend.h"
#include "backendmanager_p.h"
-#include "debug_p.h"
+#include "kscreen_debug.h"
#include <QStringList>
#include <QScopedPointer>
diff --git a/src/setconfigoperation.cpp b/src/setconfigoperation.cpp
index d4c4d49..26e4b24 100644
--- a/src/setconfigoperation.cpp
+++ b/src/setconfigoperation.cpp
@@ -24,7 +24,7 @@
#include "configoperation_p.h"
#include "config.h"
#include "configserializer_p.h"
-#include "debug_p.h"
+#include "kscreen_debug.h"
#include "output.h"
#include <QDBusPendingCallWatcher>