D16643: Correct the accept flag of the event object on DragMove

Stefan BrĂ¼ns noreply at phabricator.kde.org
Tue Feb 5 01:24:40 GMT 2019


bruns added a comment.


  As fvogt already said, the current (old) code is wrong, the event should not be blindly ignored (line 97).
  
  The second change fvogt mentioned is IMHO handled quite strangely here - `!m_enabled || m_temporaryInhibition` is the inverse of `!m_enabled || m_temporaryInhibition`, so doing a `event->ignore()` === `event->setAccepted(false)` prior to the first return statement would cover the ignored case, and allows the event to bubble up.
  
  This leaves the cases where the area is neither disabled nor inhibited. For large moves (pos() changed >= 1.0 pixels), the event is accepted, and the event is delivered to the quick item, where it can be left as is (accepted), or reset to ignored by the code.
  
  Why is a small move handled differently? Shouldn't the `if (event->pos() == oldDragMovePos)` code path be removed completely?

REPOSITORY
  R296 KDeclarative

REVISION DETAIL
  https://phabricator.kde.org/D16643

To: trmdi, mart, broulik, #plasma, hein, bruns
Cc: fvogt, aacid, bruns, dkorth, ngraham, kde-frameworks-devel, michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190205/c7f59e56/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list