![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qquickitemchangelistener_p.h>
Public Types | |
template<typename T> | |
using | InDestructorTest = decltype(T::inDestructor) |
template<typename T> | |
using | WasDeletedTest = decltype(T::wasDeleted) |
Helper class using CRTP to add tracking of listeners to a QQuickItemChangeListener implementation. Instantiated with the class that implements the QQuickItemChangeListener interface, like
When destroyed, QSafeQuickItemChangeListener will emit warning messages in {-developer-build} configurations when listeners are still registered. As the listener is at this point partially destroyed, any call to the listener interface might result in undefined behavior, such as use-after-free.
Notifications to registered listeners will in addition check if the listener is already in the destructor, and warn if that's the case. The {baseDeleted} override checks for an
inDestructor
or wasDeleted
data member of the class implementing the QSafeQuickItemChangeListener interface.
Definition at line 146 of file qquickitemchangelistener_p.h.
using QSafeQuickItemChangeListener< Self >::InDestructorTest = decltype(T::inDestructor) |
Definition at line 160 of file qquickitemchangelistener_p.h.
using QSafeQuickItemChangeListener< Self >::WasDeletedTest = decltype(T::wasDeleted) |
Definition at line 162 of file qquickitemchangelistener_p.h.
|
inlineoverride |
Definition at line 149 of file qquickitemchangelistener_p.h.
|
inlineoverridevirtual |
Reimplemented from QQuickItemChangeListener.
Definition at line 164 of file qquickitemchangelistener_p.h.
|
inlineoverridevirtual |
Reimplemented from QQuickItemChangeListener.
Definition at line 188 of file qquickitemchangelistener_p.h.