Simplify AppMenu menu management
ClosedPublic

Authored by davidedmundson on Jan 10 2017, 11:37 AM.

Details

Summary

Instead of having a menu from the importer and our custom vertical menu
then syncing entries we can simply use the factory method in
DBusMenuImporter to create our custom one from the start.

This makes memory management easier as we only need to worry about the
importer which implicitly owns the menu.

Test Plan

Ran in-window menu, everything worked for me perfectly.

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson retitled this revision from to Simplify AppMenu menu management.
davidedmundson updated this object.
davidedmundson edited the test plan for this revision. (Show Details)
davidedmundson added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptJan 10 2017, 11:37 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik accepted this revision.Jan 10 2017, 12:40 PM
broulik added a reviewer: broulik.
This revision is now accepted and ready to land.Jan 10 2017, 12:40 PM
broulik added inline comments.Jan 10 2017, 12:41 PM
appmenu/kdbusimporter.h
50

The VerticalMenu needs to be told the service name and object path of the menu, otherwise in hideMenu it can't emit "menuHidden(service, path)"

broulik added inline comments.Jan 10 2017, 12:42 PM
appmenu/appmenu.cpp
123

It has operator->() so data() shouldn't be neccessary here

appmenu/kdbusimporter.h
50

Nevermind, you uploaded my patch which does that when it shows the menu

This revision was automatically updated to reflect the committed changes.