Revision af6653c...

Go back to digest for 1st September 2013

Other in KDE Base

Eike Hein committed changes in [kde-workspace/KDE/4.11] /desktop/applets/tasks:

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 ...).


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.

File Changes

Added 2 files
  • /desktop/applets/tasks/support
  •   plasma/draghelper.cpp
  •   plasma/draghelper.h
Modified 5 files
  • /desktop/applets/tasks
  •   plasma/CMakeLists.txt
  •   plasma/tasks.cpp
  •   plasma/package/contents/ui/main.qml
  •   plasma/package/contents/ui/MouseHandler.qml
  •   plasma/package/contents/ui/Task.qml
7 files changed in total