diff options
| author | Fabian Kosmale <fabian.kosmale@qt.io> | 2025-03-20 11:42:27 +0100 |
|---|---|---|
| committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2025-03-22 00:07:20 +0100 |
| commit | 0a567a7f926f433cbd1294131aac0e80dcfd7943 (patch) | |
| tree | b61d8b9d3e8b805c80254f1bf4602bfaa5b45f0c /src/concurrent/doc/snippets/code | |
| parent | 68a16558171abccd15f5446ac208e105cf337dc0 (diff) | |
Q_DECLARE_OPAQUE_POINTER: Document footgun
Using Q_DECLARE_OPAQUE_POINTER means that the metatype system won't have
any knowledge about the type, beyond it being a pointer. That leads to
all kinds of unexpected errors in code that needs to introspect the
meta-type information to handle QObject's and gadgets, notably but not
limited to QML.
Warn about using Q_DECLARE_OPAQUE_POINTER for gadgets and QObject's, and
offer Q_MOC_INCLUDE as a potential alternative for some use cases.
Pick-to: 6.9 6.8 6.5
Task-number: QTBUG-127012
Task-number: QTBUG-134883
Change-Id: I4fe53f277d0aa51ef552d04f642364aa6613ef7c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'src/concurrent/doc/snippets/code')
0 files changed, 0 insertions, 0 deletions
