* Accessor to the up-to-date list inside the object tracker */
| 108 | * Accessor to the up-to-date list inside the object tracker |
| 109 | */ |
| 110 | QList<T*> data() const |
| 111 | { |
| 112 | // This is considered safe, as QList<X*> and QList<Y*> have the same memory layout |
| 113 | // also see http://comments.gmane.org/gmane.comp.lib.qt.general/38943 |
| 114 | return *reinterpret_cast<const QList<T*>*>(&m_tracker.data()); |
| 115 | } |
| 116 | |
| 117 | private: |
| 118 | ObjectListTracker m_tracker; |
no outgoing calls