Changeset View
Changeset View
Standalone View
Standalone View
plugin/libdbusmenuqt/dbusmenuimporter.cpp
Context not available. | |||||
410 | for (QAction *action: menu->actions()) { | 410 | for (QAction *action: menu->actions()) { | ||
---|---|---|---|---|---|
411 | int id = action->property(DBUSMENU_PROPERTY_ID).toInt(); | 411 | int id = action->property(DBUSMENU_PROPERTY_ID).toInt(); | ||
412 | if (! newDBusMenuItemIds.contains(id)) { | 412 | if (! newDBusMenuItemIds.contains(id)) { | ||
413 | menu->removeAction(action); | 413 | // Not calling removeAction() as QMenu will immediately close when it becomes empty, | ||
414 | // which can happen when an application completely reloads this menu. | ||||
415 | // When the action is deleted deferred, it is removed from the menu. | ||||
414 | action->deleteLater(); | 416 | action->deleteLater(); | ||
415 | d->m_actionForId.remove(id); | 417 | d->m_actionForId.remove(id); | ||
416 | } | 418 | } | ||
Context not available. |