poboiko created this revision.
poboiko added reviewers: Plasma, broulik.
Herald added a project: Plasma.
poboiko requested review of this revision.

REVISION SUMMARY
  Right now, the "appmenutest" application fails to show the "Menu C" item, 
which is dynamically generated.
  (this also happens with LyX, due to the same reason)
  
  After some investigation, I've noted that the following happens:
  
  1. User opens a menu
  2. aboutToShow() signal gets triggered inside the application, which 
populates the menu
  3. We call GetLayout() to obtain new layout
  4. Old menu entries inside the `DBusMenuImporter` are removed, new menu 
entries are created
  5. However, because menu gets empty, it decides to close itself
  
  There is a simple workaround: just populate menu with new items BEFORE 
removing obsolete items.
  Thus menu never gets empty, and does not close itself.

TEST PLAN
  LyX and appmenutest are now working again!

REPOSITORY
  R120 Plasma Workspace

BRANCH
  dbusmenu-bug (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D15637

AFFECTED FILES
  libdbusmenuqt/dbusmenuimporter.cpp

To: poboiko, #plasma, broulik
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart

Reply via email to