3b9629e8bd
Using QPointers (or any type that makes a QPointer part of its identity) as a key in any associative container is wrong. They get externally set to nullptr, violating the associative container's class invariants, which could lead to data corruption, even though bucket-based hash implementations are less susceptible than binary trees. To fix, write a new class that acts much like the old QPair<QPointer<>,QByteArray>, but uses the QPointer only as a guard, not as part of its identity. To preseve identity, also saves the naked pointer originally passed and uses that for op== and qHash(). Change-Id: I4fa5a6bf86bad8fe7f5abe53d7c7f3ad3754d8d6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> |
||
---|---|---|
.. | ||
qabstractstate_p.h | ||
qabstractstate.cpp | ||
qabstractstate.h | ||
qabstracttransition_p.h | ||
qabstracttransition.cpp | ||
qabstracttransition.h | ||
qeventtransition_p.h | ||
qeventtransition.cpp | ||
qeventtransition.h | ||
qfinalstate.cpp | ||
qfinalstate.h | ||
qhistorystate_p.h | ||
qhistorystate.cpp | ||
qhistorystate.h | ||
qsignaleventgenerator_p.h | ||
qsignaltransition_p.h | ||
qsignaltransition.cpp | ||
qsignaltransition.h | ||
qstate_p.h | ||
qstate.cpp | ||
qstate.h | ||
qstatemachine_p.h | ||
qstatemachine.cpp | ||
qstatemachine.h | ||
statemachine.pri |