Commit a409b06b authored by Konrad Materka's avatar Konrad Materka
Browse files

[applets/systemtray] Fix context menu misplaced

For SNI icons menu is imported from DBus. If during import it is
changed, for example some actions added or replaced, new actions are
added, but old one are only marked for removal in next event loop run.
As a result menu size is too big until delereLater takes effect.
Queue connection, so that Qt will have a chance to delete menu entires
before menu is used.

BUG: 421275
FIXED-IN: 5.18.6
parent 98397d7f
......@@ -24,7 +24,8 @@ StatusNotifierItemJob::StatusNotifierItemJob(StatusNotifierItemSource *source, c
ServiceJob(source->objectName(), operation, parameters, parent),
connect(source, SIGNAL(contextMenuReady(QMenu*)), this, SLOT(contextMenuReady(QMenu*)));
// Queue connection, so that all 'deleteLater' are performed before we use updated menu.
connect(source, SIGNAL(contextMenuReady(QMenu*)), this, SLOT(contextMenuReady(QMenu*)), Qt::QueuedConnection);
connect(source, &StatusNotifierItemSource::activateResult, this, &StatusNotifierItemJob::activateCallback);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment