diff options
| author | Marc Mutz <[email protected]> | 2023-10-13 12:29:44 +0200 |
|---|---|---|
| committer | Marc Mutz <[email protected]> | 2023-10-13 13:31:56 +0200 |
| commit | 3923a0f52b662f567b91b4ec60ec1da3008ff425 (patch) | |
| tree | 57bd3769178d35761b6a0f708cf211cd619ba492 | |
| parent | 015832e24a211a0e5eec755319e51702386dae5b (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: I4f4f738e6dc46aec3e5772036cf2c94e6141c535
Reviewed-by: Fabian Kosmale <[email protected]>
| -rw-r--r-- | src/plugins/darwin/qdarwinwebview_p.h | 2 | ||||
| -rw-r--r-- | src/plugins/webengine/qwebenginewebview_p.h | 2 | ||||
| -rw-r--r-- | src/webview/qwebview_p.h | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/darwin/qdarwinwebview_p.h b/src/plugins/darwin/qdarwinwebview_p.h index 6625431..010b2a7 100644 --- a/src/plugins/darwin/qdarwinwebview_p.h +++ b/src/plugins/darwin/qdarwinwebview_p.h @@ -21,6 +21,8 @@ #include <private/qabstractwebview_p.h> +#include <QtCore/qpointer.h> + #if defined(Q_OS_IOS) && defined(__OBJC__) #include <UIKit/UIGestureRecognizer.h> diff --git a/src/plugins/webengine/qwebenginewebview_p.h b/src/plugins/webengine/qwebenginewebview_p.h index 16468d5..929f290 100644 --- a/src/plugins/webengine/qwebenginewebview_p.h +++ b/src/plugins/webengine/qwebenginewebview_p.h @@ -25,6 +25,8 @@ #include <QtWebEngineQuick/QQuickWebEngineProfile> #include <QtWebEngineQuick/private/qquickwebenginesettings_p.h> +#include <QtCore/qpointer.h> + QT_BEGIN_NAMESPACE class QQuickWebEngineView; diff --git a/src/webview/qwebview_p.h b/src/webview/qwebview_p.h index b561b42..42eb1ff 100644 --- a/src/webview/qwebview_p.h +++ b/src/webview/qwebview_p.h @@ -23,6 +23,8 @@ #include <QtCore/qvariant.h> #include <QtGui/qimage.h> +#include <QtCore/qpointer.h> + QT_BEGIN_NAMESPACE class QWebViewLoadRequestPrivate; |
