Correct the accept flag of the event object on DragMove

Authored by trmdi on Feb 5 2019, 6:43 PM.

Description

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

Details

Committed
fvogtFeb 5 2019, 6:55 PM
Reviewer
Plasma
Differential Revision
D16643: Correct the accept flag of the event object on DragMove
Parents
R296:e22529eeed0c: Use different "None" item icon in grid view KCMs
Branches
Unknown
Tags
Unknown