From 44e753fc9f7c22477b580a34662b969e544a56e2 Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Sat, 24 Aug 2019 17:19:45 +0200 Subject: [PATCH] Added QLoggingCategory to Falkon Summary: Getting to know how the application works i needed a way to investigate some bits and pieces in the code. That's why I created the following patch. Debug lines can be created with the following code: `qCDebug(FALKON_PRIVATE_LOG) << "testing 123, testing";` and debug lines can be activated with the runtime flag: ` QT_LOGGING_RULES="org.kde.falkon.debug=true"` Reviewers: #falkon, drosca Reviewed By: #falkon, drosca Subscribers: cullmann, falkon Tags: #falkon Differential Revision: https://phabricator.kde.org/D21770 --- src/lib/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index 74775e351..96f706017 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -268,6 +268,9 @@ set(SRCS ${SRCS} webtab/webtab.cpp ) +# add the logging category for FALKON +ecm_qt_declare_logging_category(LOGGING_SRCS HEADER falkon_private_debug.h IDENTIFIER "FALKON_PRIVATE_LOG" CATEGORY_NAME "org.kde.falkon") + if (HAVE_LIBINTL) set(SRCS ${SRCS} plugins/qml/api/i18n/qmli18n.cpp) endif() @@ -336,7 +339,7 @@ qt5_add_resources(SRCS adblock/adblock.qrc ) -add_library(FalkonPrivate SHARED ${SRCS}) +add_library(FalkonPrivate SHARED ${SRCS} ${LOGGING_SRCS}) get_property(QT_WEBENGINE_INCLUDE_DIRS TARGET Qt5::WebEngine PROPERTY INTERFACE_INCLUDE_DIRECTORIES) target_include_directories(FalkonPrivate SYSTEM PUBLIC ${QT_WEBENGINE_INCLUDE_DIRS})