Skip to content
Commit af6653c7 authored by Eike Hein's avatar Eike Hein
Browse files

Factor drag instanciation out into a C++ helper.

This moves the drag source out of the task delegate, making
sure it survives the delegate in scenarios where it might be
destroyed prior to dropping (e.g. due to a virtual desktop
switch), avoiding a crash. I'd like to move this back into
QML in Plasma 2 if we can add a programmatic way to initiate
a drag to DragArea, or work through some of the event hand-
ling issues involved with having a single drag area below
the repeater (though this would mean pretty ugly spaghetti
code regardless), or QML gains the ability to reparent
objects including transferring object ownership (unlikely ...).
BUG:323742

This also reduces the number of sub-items the task delegate
instanciates and specifically the number of mouse event-
handling items per task from two to one, simplifying the
scene mouse event filtering that's going on, which appears
to address a second rare crash (or at least it has become
unreproducable here), although further investigation to
prove this conclusively would be nice.
BUG:322283
parent 3ff3f433
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment