Replace recursive layout loading with dynamic loading

Authored by davidedmundson on Jan 11 2017, 1:55 PM.

Description

Replace recursive layout loading with dynamic loading

Summary:
The previous code worked as follows:

  • when we show a menu we would emit aboutToShow on the root item
  • we would then recursively load the /entire/ menu structure before

emitting we were done.

Because we only sent aboutToShow on the root menu, any clients that were connected to
a submenu's aboutToShow never got an aboutToShow signal.

This patch does the (in retrospect far more obvious) fix of just
calling aboutToShow dynamically on each submenu when it's time to show,
then updating the menu whilst it's showing.

Test Plan: Dynamic menus now work, DBus traffic is considerably down

Reviewers: Plasma, broulik

Reviewed By: Plasma, broulik

Subscribers: broulik, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D4059

Details

Committed
davidedmundsonJan 11 2017, 1:56 PM
Reviewer
Plasma
Differential Revision
D4059: Replace recursive layout loading with dynamic loading
Parents
R120:1754c135c134: Reuse QAction and QMenu items on updates
Branches
Unknown
Tags
Unknown