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.

Task-number: QTBUG-132090
Change-Id: I5b2a93822a698f55c52c1be87ebf8a689f49e2a3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit b957dfc6e06deed64e20e8eee5d2164250b28b95)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Volker Hilsheimer 2024-12-18 15:30:38 +01:00 committed by Qt Cherry-pick Bot
parent 1596b5855c
commit 319b31a5a2
2 changed files with 2 additions and 6 deletions

View File

@ -14,6 +14,7 @@
#include <QtCore/QDebug>
#if QT_CONFIG(test_gui)
#include <QtCore/qloggingcategory.h>
#include <private/qinputdevicemanager_p.h>
#include <private/qeventpoint_p.h>
#include <private/qhighdpiscaling_p.h>
@ -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)
/*!

View File

@ -8,10 +8,6 @@
#include <QtGui/qevent.h>
#include <QtCore/qmap.h>
#if QT_CONFIG(test_gui)
#include <QtCore/qloggingcategory.h>
#endif // #if QT_CONFIG(test_gui)
QT_BEGIN_NAMESPACE
class QWindow;
@ -75,7 +71,6 @@ protected:
//
#if QT_CONFIG(test_gui)
Q_DECLARE_LOGGING_CATEGORY(lcQtGuiTest)
namespace QtGuiTest
{
Q_NAMESPACE_EXPORT(Q_GUI_EXPORT)