I spent some time debugging it, I found out the following:
the main problem is that ItemParentHasChanged arrives to ListItem *after* setSelected is called. That means UCViewItemsAttachedPrivate::get(listItem) returns a QObject(0x0),
hence UCViewItemsAttachedPrivate::get(listItem)->addToSelected(q) is called on an uninitialized object.
addToSelected then calls selectedList.contains(<whatever>),
but selectedList is an uninitialized object at that point (note: even though it sits on the stack) because it is part of the state of the object UCViewItemsAttachedPrivate, which is uninitialized, and that makes selectedItem.contains(<whatever>) implementation lead to the crash.
I confirm the bug.
I spent some time debugging it, I found out the following: anged arrives to ListItem *after* setSelected is called. That means UCViewItemsAtta chedPrivate: :get(listItem) returns a QObject(0x0), chedPrivate: :get(listItem) ->addToSelected (q) is called on an uninitialized object. contains( <whatever> ), chedPrivate, which is uninitialized, and that makes selectedItem. contains( <whatever> ) implementation lead to the crash.
the main problem is that ItemParentHasCh
hence UCViewItemsAtta
addToSelected then calls selectedList.
but selectedList is an uninitialized object at that point (note: even though it sits on the stack) because it is part of the state of the object UCViewItemsAtta