aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlincubator_p.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-09-29 11:19:51 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-10-06 04:59:46 +0000
commit5a665bc4740106a7c3932506173229ddc8aec8be (patch)
tree83065143c68e96cc94597f98b125cf6af71b3868 /src/qml/qml/qqmlincubator_p.h
parent0bdb7b2a411d2fd480d8041fab91e883b5fd253f (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: I9b98cda524a0e6a61be7805edda708916bb2bc2b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlincubator_p.h')
-rw-r--r--src/qml/qml/qqmlincubator_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlincubator_p.h b/src/qml/qml/qqmlincubator_p.h
index d786cd9f52..eec0f7f421 100644
--- a/src/qml/qml/qqmlincubator_p.h
+++ b/src/qml/qml/qqmlincubator_p.h
@@ -12,6 +12,8 @@
#include <private/qqmlengine_p.h>
#include <private/qqmlguardedcontextdata_p.h>
+#include <QtCore/qpointer.h>
+
//
// W A R N I N G
// -------------