Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
Description
In particular, the ExtraCacheData is storing a heap-allocated object in a QVariant that anyone with access to the private API can unsetExtra() at any time, without going through removeExtraItemCache(). This is pretty brittle, and you can't fault Coverity complaining about finding potential paths that would leak the cache object.
This flexibility is really over-engineered. extras should just be a unique_ptr to a struct with field of concrete types, not QVariant, and
- the ExtraCacheData should be held in a unique_ptr in there
- ExtraToolTip as a QString
- etc