-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deliver QContextMenuEvent via ExtraData.contextMenu, not event filter
Event filtering can be problematic. At least this was a more reasonable use case for a filter than some others in Controls; still, we already have a switch case in QQuickItem::event(), and plan to add a virtual QQuickItem::contextMenuEvent() in Qt 7, so we might as well mock it up now as QQuickItemPrivate::contextMenuEvent(). Dispatching only the QContextMenuEvents ought to be cheaper than filtering all events. On the downside, ExtraData gets a little bigger. We add QQuickItemPrivate::setContextMenu() because QQuickItem::ExtraData is not exported; and to enable categorized logging when one menu is replaced with another, this setter returns the previously-known menu, if any. Pick-to: 6.9 Change-Id: I9f2553fb579409becf797046dcc473260320c6a5 Reviewed-by: Mitch Curtis <[email protected]>
- Loading branch information
1 parent
5e69459
commit 24ac769
Showing
5 changed files
with
53 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters