Details
-
Technical task
-
Resolution: Unresolved
-
P2: Important
-
None
Description
When storing a QObject pointer or a QObject-subclass pointer in a QVariant, the raw pointer is stored in QVariant's QObject *Data::o member. Numerous times in the past this has caused crashes in user code when the pointer became dangling.
We should consider making QVariant safe by defaulting to supporting a weak reference.
Unfortunately, this cannot be done in Qt 5 without breaking binary compatibility.
Attachments
Issue Links
- resulted from
-
QTBUG-55840 Application crash in QML after updating QT from 5.6 to 5.7
- Closed