From cffdab8c333a4e0960711a6ba6f4c3be053079e8 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Thu, 1 Apr 2021 17:55:03 +0200 Subject: [PATCH] Use debug logging categories --- CMakeLists.txt | 10 ---------- src/CMakeLists.txt | 9 +++++++++ src/interfaces/window.cpp | 6 +++--- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 33bcfa5..2752e2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,14 +59,4 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/LayerShellQtConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/LayerShellQtConfigVersion.cmake DESTINATION ${CMAKECONFIG_INSTALL_DIR}) -ecm_qt_declare_logging_category(ksld_SRCS - HEADER - layershellqt_logging.h - IDENTIFIER - LAYERSHELL_QT - CATEGORY_NAME - layershellqt - DEFAULT_SEVERITY - Critical -) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 12e0bef..102e644 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,6 +6,15 @@ ecm_add_qtwayland_client_protocol(LAYER_SHELL_SOURCES PROTOCOL wlr-layer-shell-u add_library(layer-shell SHARED qwaylandlayershellintegrationplugin.cpp) target_link_libraries(layer-shell LayerShellQtInterface Qt5::WaylandClient Qt::WaylandClientPrivate Qt5::XkbCommonSupportPrivate) +ecm_qt_declare_logging_category(LAYER_SHELL_SOURCES + HEADER + layershellqt_logging.h + IDENTIFIER + LAYERSHELLQT + CATEGORY_NAME + layershellqt +) + add_library(LayerShellQtInterface SHARED qwaylandlayersurface.cpp interfaces/window.cpp interfaces/shell.cpp qwaylandlayershellintegration.cpp qwaylandlayershell.cpp ${LAYER_SHELL_SOURCES}) target_link_libraries(LayerShellQtInterface PRIVATE Qt5::Gui Qt::WaylandClientPrivate Qt5::XkbCommonSupportPrivate Wayland::Client) target_include_directories(LayerShellQtInterface PUBLIC "$" diff --git a/src/interfaces/window.cpp b/src/interfaces/window.cpp index bae4e6e..2e90eb6 100644 --- a/src/interfaces/window.cpp +++ b/src/interfaces/window.cpp @@ -5,9 +5,9 @@ */ #include "window.h" -#include #include #include +#include #include "../qwaylandlayersurface_p.h" using namespace LayerShellQt; @@ -53,12 +53,12 @@ Window *Window::get(QWindow *window) { auto ww = dynamic_cast(window->handle()); if (!ww) { - qDebug() << "window not a wayland window" << window; + qCDebug(LAYERSHELLQT) << "window not a wayland window" << window; return nullptr; } QWaylandLayerSurface* s = qobject_cast(ww->shellSurface()); if (!s) { - qDebug() << "window not using wlr-layer-shell" << window << ww->shellSurface(); + qCDebug(LAYERSHELLQT) << "window not using wlr-layer-shell" << window << ww->shellSurface(); return nullptr; }