summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/shared/coreprotocol.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-10-13 12:26:25 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-10-13 13:31:45 +0200
commit0740726c9bed2c09a874d3974b9852cdb6d91b37 (patch)
tree00f2b422c47b194ca1274d5194672e855d96c286 /tests/auto/client/shared/coreprotocol.h
parenteb1a83ea9bb145d72a23f925002c9e9a745c110e (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: I8eb00fbd2df16300b0cbfc4157612a45c72ac12c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/client/shared/coreprotocol.h')
-rw-r--r--tests/auto/client/shared/coreprotocol.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/client/shared/coreprotocol.h b/tests/auto/client/shared/coreprotocol.h
index 20a3f2122..15ade2bca 100644
--- a/tests/auto/client/shared/coreprotocol.h
+++ b/tests/auto/client/shared/coreprotocol.h
@@ -6,6 +6,8 @@
#include "corecompositor.h"
+#include <QtCore/qpointer.h>
+
#include <qwayland-server-wayland.h>
namespace MockCompositor {