[AppMenuModel] Don't store actions ourselves
ClosedPublic

Authored by broulik on Mar 15 2018, 11:09 AM.

Details

Summary

Always redirect to the ones in m_menu in case they get deleted or otherwise altered.
Also emit dataChanged when an action changes and reset the model when it gets deleted.
This fixes the menu getting confused in LibreOffice 6 with gmenu-dbusmenu-proxy.

CCBUG: 391868

Test Plan

It does not fix the unresponsive/empty "File" menu item I get when running soffice --writer directly, needs further investigation, but the appmenu and window menu are no longer intermingled.
It also fixes crashes (dangling pointer) I had when a menu item got removed

As for the TODO role change and qVariantFromValu<void*> stuff I put in there and left, that's keep compatibility with e.g. latte dock and active window control

Diff Detail

Repository
R120 Plasma Workspace
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Mar 15 2018, 11:09 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 15 2018, 11:09 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Mar 15 2018, 11:09 AM
broulik edited the test plan for this revision. (Show Details)Mar 15 2018, 11:19 AM
davidedmundson accepted this revision.Mar 20 2018, 1:52 PM
This revision is now accepted and ready to land.Mar 20 2018, 1:52 PM
This revision was automatically updated to reflect the committed changes.