summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qmdiarea_p.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-10-05 17:26:25 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-10-12 21:38:54 +0200
commit4a7c76d4a5365343178ea29c8a8e9b8d8acb89b5 (patch)
tree56c914e0c8892b494ea645d5b51410385140fef8 /src/widgets/widgets/qmdiarea_p.h
parent0b6d2d9187f87bb24c75f6d171f43677e0845201 (diff)
Include what you need: <QPointer>
All these TUs relied on transitive includes of qpointer.h, maybe to a large extent via qevent.h, though, given that qevent.h is more or less the only public QtBase header that includes qpointer.h, something else seems to be at play here. Said qevent.h actually needs QPointer in-name-only, so a forward declaration would suffice. Prepare for qevent.h dropping the include. The algorithm I used was: If the TU mentions 'passiveGrabbers', the name of the QEvent function that returns QPointers, and the TU doesn't have qpointer.h included explicitly, include it. That may produce False Positives, but better safe than sorry. Otherwise, in src/, add an include to all source and header files which mention QPointer. Exception: if foo.h of a foo.cpp already includes it, don't include again. Task-number: QTBUG-117670 Change-Id: I3321cccdb41ce0ba6d8a709cea92427aba398254 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/widgets/widgets/qmdiarea_p.h')
-rw-r--r--src/widgets/widgets/qmdiarea_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/widgets/qmdiarea_p.h b/src/widgets/widgets/qmdiarea_p.h
index 2e66a31fbc..e57b9772ca 100644
--- a/src/widgets/widgets/qmdiarea_p.h
+++ b/src/widgets/widgets/qmdiarea_p.h
@@ -29,6 +29,8 @@ QT_REQUIRE_CONFIG(mdiarea);
#include <private/qmdisubwindow_p.h>
#include <private/qabstractscrollarea_p.h>
+#include <QtCore/qpointer.h>
+
QT_BEGIN_NAMESPACE
namespace QMdi {