Use MenuItem's action property directly in ActionMenuItem
ClosedPublic

Authored by ahiemstra on Oct 8 2019, 2:02 PM.

Details

Summary

Now that Kirigami's Action is a QQC2 Action subclass we can use
MenuItem's action property directly, removing the need for custom
bindings.

This fixes Kirigami ActionMenus not showing keyboard shortcuts for
actions, as that binding was missing.

Test Plan

Applications' overflow menus and action submenus still work correctly.
Menu items for actions that have keyboard shortcuts now display them.

Diff Detail

Repository
R169 Kirigami
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ahiemstra created this revision.Oct 8 2019, 2:02 PM
Restricted Application added a project: Kirigami. · View Herald TranscriptOct 8 2019, 2:02 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ahiemstra requested review of this revision.Oct 8 2019, 2:02 PM
apol added a subscriber: apol.Oct 8 2019, 2:17 PM

+1

src/controls/private/ActionMenuItem.qml
26

visible: action.visible === undefined || action.visible

ahiemstra updated this revision to Diff 67544.Oct 9 2019, 11:42 AM
  • Simplify visible binding
ahiemstra marked an inline comment as done.Oct 9 2019, 11:42 AM
mart accepted this revision.Oct 9 2019, 1:23 PM
This revision is now accepted and ready to land.Oct 9 2019, 1:23 PM
This revision was automatically updated to reflect the committed changes.