D16643: Correct the accept flag of the event object on DragMove
Fabian Vogt
noreply at phabricator.kde.org
Tue Feb 5 08:44:24 GMT 2019
fvogt added a comment.
> 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.
Sure, but AFAICT that's just a matter of taste whether to `ignore(); if(!something) return; do stuff; accept();` or `accept(something); if(!something) return; do stuff;`.
> Why is a small move handled differently? Shouldn't the if (event->pos() == oldDragMovePos) code path be removed completely?
To not send a move event without position changes. `DeclarativeDragDropEvent` only has integer positions. Removing this condition might break existing code.
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/2f7b35f5/attachment.html>
More information about the Kde-frameworks-devel
mailing list