Use MenuItem's action property directly in ActionMenuItem
ClosedPublic

Authored by ahiemstra on Tue, Oct 8, 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.Tue, Oct 8, 2:02 PM
Restricted Application added a project: Kirigami. · View Herald TranscriptTue, Oct 8, 2:02 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ahiemstra requested review of this revision.Tue, Oct 8, 2:02 PM
apol added a subscriber: apol.Tue, Oct 8, 2:17 PM

+1

src/controls/private/ActionMenuItem.qml
26

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

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