Fix PrivateActionToolButton with menu not clearing checked state properly
ClosedPublic

Authored by ahiemstra on Aug 26 2019, 1:51 PM.

Details

Summary

When closing the menu of a PrivateActionToolButton with a click on the
button, the checked state of the button would not properly clear. So
instead use the button's toggled signal to handle menu open/close.
Combined with a close policy where the parent is explicitly excluded we
can properly clear the checked state.

Test Plan

Run kirigami2gallery and go to the "multiple columns" page. The menus for
the left/main/right actions should popup and close correctly when using
the buttons to close them or when clicking outside the menu. Without this
change, the menus will behave inconsistently.

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.Aug 26 2019, 1:51 PM
Restricted Application added a project: Kirigami. · View Herald TranscriptAug 26 2019, 1:51 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ahiemstra requested review of this revision.Aug 26 2019, 1:51 PM
ahiemstra edited the test plan for this revision. (Show Details)Aug 26 2019, 1:52 PM
ahiemstra added a reviewer: Kirigami.
ahiemstra updated this revision to Diff 64663.Aug 26 2019, 1:53 PM
ahiemstra edited the test plan for this revision. (Show Details)
  • Fix null object error
ahiemstra updated this revision to Diff 64664.Aug 26 2019, 1:56 PM
  • Remove usage of no longer existing property
ngraham accepted this revision.Aug 26 2019, 3:03 PM
This revision is now accepted and ready to land.Aug 26 2019, 3:03 PM
This revision was automatically updated to reflect the committed changes.