Correct the accept flag of the event object on DragMove
Summary:
- m_enabled or m_temporaryInhibition could change while DragMove, so we should place setAccepted() on top of the function body. Otherwise, the accept flag of event could be wrong in the case m_enabled or m_temporaryInhibition changes while DragMove.
- Don't call setAccepted(false) wrongly if event->pos() == m_oldDragMovePo
BUG: 396011
Test Plan:
- Drag a file from Dolphin -> Desktop (Desktop containment layout) -> too difficult -> fixed
- Drag an icon on Desktop (Folder view layout) from one place to another one -> too difficult -> fixed
- Add widgets to the Plasma panel -> too difficult -> fixed
- Drag a file from Dolphin -> Desktop (Folder view layout) -> still easy
Reviewers: mart, broulik, Plasma, hein, bruns
Reviewed By: mart, Plasma
Subscribers: fvogt, aacid, bruns, dkorth, ngraham, kde-frameworks-devel
Tags: Frameworks
Differential Revision: https://phabricator.kde.org/D16643