RFC: [MouseEventListener] Allow accepting mouse event
ClosedPublic

Authored by broulik on Nov 17 2017, 2:05 PM.

Details

Summary

This will keep the event from propagating. Accepting a press event will also not result in clicked or pressAndHold being handled.
In Qt 5.10 event propagation changed resulting in FolderView opening both the item context menu and containment context menu. Imho this actually makes sense since we never accepted the mouse event there.

Test Plan

I put an mouse.accepted in FolderView after opening the context menu and no longer get double menus showing up.
However, I'm not sure how delicate this change is. In theory it shouldn't change existing behavior and fixing/changing FV might be the better solution?

Diff Detail

Repository
R296 KDeclarative
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Nov 17 2017, 2:05 PM
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptNov 17 2017, 2:05 PM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
apol added a subscriber: apol.Nov 17 2017, 2:58 PM
apol added inline comments.
src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.h
73

isAccepted?

hein accepted this revision.Nov 22 2017, 9:48 AM
This revision is now accepted and ready to land.Nov 22 2017, 9:48 AM
This revision was automatically updated to reflect the committed changes.