D16643: Correct the accept flag of the event object on DragMove
Stefan BrĂ¼ns
noreply at phabricator.kde.org
Tue Nov 6 19:25:18 GMT 2018
bruns added a comment.
In D16643#354262 <https://phabricator.kde.org/D16643#354262>, @trmdi wrote:
> In D16643#354120 <https://phabricator.kde.org/D16643#354120>, @bruns wrote:
>
> > `m_enabled` may change between //consecutive// DragMove events, but not during an event.
> >
> > In this case, though, it does not, and is constantly true. You can verify this by attaching a debugger or by adding debug statements.
> >
> > The only wrong code part is the `setAccepted(false)`, which should be `setAccepted(true)` (or just `accept()`, both are equivalent).
>
>
> Please see these videos, note the cursor icon:
>
> - If I place `setAccepted(m_enabled)` below the first if like you said: https://streamable.com/oj1j4 -> the cursor does not change
> - If I place `setAccepted(m_enabled)` above the first if like I've done in my patch: https://streamable.com/2g58g -> the cursor changes
You have a conceptual misunderstanding of the enabled property, see QQuickItem <http://doc.qt.io/qt-5/qml-qtquick-item.html#enabled-prop>
> enabled : bool
> This property holds whether the item receives mouse and keyboard events. By default this is true.
It would also be good if you stick to one issue at a time.
REPOSITORY
R296 KDeclarative
REVISION DETAIL
https://phabricator.kde.org/D16643
To: trmdi, mart, broulik, #plasma, hein, davidedmundson
Cc: bruns, dkorth, ngraham, kde-frameworks-devel, michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181106/0ab4d7ec/attachment.html>
More information about the Kde-frameworks-devel
mailing list