summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-10-13 12:17:10 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-10-13 12:38:00 +0200
commit9194fc5ae5d714aba03b4bd4a239c46770961b86 (patch)
treeefdd5a21a05a80e390152a7d4ab10678b7daec6e
parent583a6cffcc739dd47dadef1e2390c48bf8731900 (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: I8bdf99ae10f7a4430cb23c7a0a52ef646bae750a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r--src/statemachine/qabstracttransition_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/statemachine/qabstracttransition_p.h b/src/statemachine/qabstracttransition_p.h
index 3a63c3d..08ac45d 100644
--- a/src/statemachine/qabstracttransition_p.h
+++ b/src/statemachine/qabstracttransition_p.h
@@ -18,6 +18,7 @@
#include <private/qobject_p.h>
#include <QtCore/qlist.h>
+#include <QtCore/qpointer.h>
#include <QtCore/qsharedpointer.h>
QT_REQUIRE_CONFIG(statemachine);