Fix the world's most evil typo

Authored by olivierjg on Oct 10 2015, 4:25 PM.

Description

Fix the world's most evil typo

qRegisterMetaType was called with QList<CompletionTreeElement>
and "QList<QExplicitlySharedDataPointer<CompletionTreeElement>>"

This means that when a list of /pointers/ to tree elements is
passed though a queued connection (ie, from the completion worker
thread), QMetaType "copies" the pointer list into a QList of
CompletionTreeElement (actually just a ref-count bump on the list
of pointers' internal data).

Now, if the pointer QList is detached in the slot, when the slot
returns, the QMetaType's stored copy notices that it has the last
copy of the list data, and all the CompletionTreeElementPointers
are destructed with the CompletionTreeElement destructor.

This is sneaky -- because until you notice in the backtrace that
the list is of the wrong type, it looks like the pointers are
deleting their shared data (which has a non-zero reference count)

Details

Committed
olivierjgOct 10 2015, 8:36 PM
Parents
R32:f99753088ffe: Add signal to notify on active assistant change
Branches
Unknown
Tags
Unknown