Skip to content

Commit

Permalink
QTestLib: Remove logging category declaration from public header
Browse files Browse the repository at this point in the history
The lcQtGuiTest category is only used in qtestsupport_gui.cpp, so
declare it there as a static logging category.

Addresses header-review comment, amends
5ac4f04.

Pick-to: 6.9
Task-number: QTBUG-132090
Change-Id: I5b2a93822a698f55c52c1be87ebf8a689f49e2a3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
  • Loading branch information
vohi committed Dec 20, 2024
1 parent 1bd883d commit b957dfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/gui/kernel/qtestsupport_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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)

/*!
Expand Down
5 changes: 0 additions & 5 deletions src/gui/kernel/qtestsupport_gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b957dfc

Please sign in to comment.