From b957dfc6e06deed64e20e8eee5d2164250b28b95 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 18 Dec 2024 15:30:38 +0100 Subject: [PATCH] QTestLib: Remove logging category declaration from public header The lcQtGuiTest category is only used in qtestsupport_gui.cpp, so declare it there as a static logging category. Addresses header-review comment, amends 5ac4f04325a56d47812f528fe31ceb0d4932f664. Pick-to: 6.9 Task-number: QTBUG-132090 Change-Id: I5b2a93822a698f55c52c1be87ebf8a689f49e2a3 Reviewed-by: Axel Spoerl Reviewed-by: Juha Vuolle --- src/gui/kernel/qtestsupport_gui.cpp | 3 ++- src/gui/kernel/qtestsupport_gui.h | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gui/kernel/qtestsupport_gui.cpp b/src/gui/kernel/qtestsupport_gui.cpp index 85f791dd450..5867028b630 100644 --- a/src/gui/kernel/qtestsupport_gui.cpp +++ b/src/gui/kernel/qtestsupport_gui.cpp @@ -14,6 +14,7 @@ #include #if QT_CONFIG(test_gui) +#include #include #include #include @@ -183,7 +184,7 @@ QEventPoint &QTouchEventSequence::pointOrPreviousPoint(int touchId) // We mean it. // #if QT_CONFIG(test_gui) -Q_LOGGING_CATEGORY(lcQtGuiTest, "qt.gui.test"); +Q_STATIC_LOGGING_CATEGORY(lcQtGuiTest, "qt.gui.test"); #define deb qCDebug(lcQtGuiTest) /*! diff --git a/src/gui/kernel/qtestsupport_gui.h b/src/gui/kernel/qtestsupport_gui.h index 349c48ef6e7..581e13713e8 100644 --- a/src/gui/kernel/qtestsupport_gui.h +++ b/src/gui/kernel/qtestsupport_gui.h @@ -8,10 +8,6 @@ #include #include -#if QT_CONFIG(test_gui) -#include -#endif // #if QT_CONFIG(test_gui) - QT_BEGIN_NAMESPACE class QWindow; @@ -75,7 +71,6 @@ class Q_GUI_EXPORT QTouchEventSequence // #if QT_CONFIG(test_gui) -Q_DECLARE_LOGGING_CATEGORY(lcQtGuiTest) namespace QtGuiTest { Q_NAMESPACE_EXPORT(Q_GUI_EXPORT)