Changeset View
Changeset View
Standalone View
Standalone View
dataengines/statusnotifieritem/statusnotifieritemsource.cpp
Show First 20 Lines • Show All 362 Lines • ▼ Show 20 Line(s) | 361 | if (!m_menuImporter) { | |||
---|---|---|---|---|---|
363 | if (!menuObjectPath.isEmpty()) { | 363 | if (!menuObjectPath.isEmpty()) { | ||
364 | if (menuObjectPath == QLatin1String("/NO_DBUSMENU")) { | 364 | if (menuObjectPath == QLatin1String("/NO_DBUSMENU")) { | ||
365 | // This is a hack to make it possible to disable DBusMenu in an | 365 | // This is a hack to make it possible to disable DBusMenu in an | ||
366 | // application. The string "/NO_DBUSMENU" must be the same as in | 366 | // application. The string "/NO_DBUSMENU" must be the same as in | ||
367 | // KStatusNotifierItem::setContextMenu(). | 367 | // KStatusNotifierItem::setContextMenu(). | ||
368 | qWarning() << "DBusMenu disabled for this application"; | 368 | qWarning() << "DBusMenu disabled for this application"; | ||
369 | } else { | 369 | } else { | ||
370 | m_menuImporter = new PlasmaDBusMenuImporter(m_statusNotifierItemInterface->service(), menuObjectPath, iconLoader(), this); | 370 | m_menuImporter = new PlasmaDBusMenuImporter(m_statusNotifierItemInterface->service(), menuObjectPath, iconLoader(), this); | ||
371 | connect(m_menuImporter, SIGNAL(menuUpdated()), this, SLOT(contextMenuReady())); | 371 | connect(m_menuImporter, &PlasmaDBusMenuImporter::menuUpdated, this, [this](QMenu *menu) { | ||
372 | if (menu == m_menuImporter->menu()) { | ||||
373 | contextMenuReady(); | ||||
374 | } | ||||
375 | }); | ||||
372 | } | 376 | } | ||
373 | } | 377 | } | ||
374 | } | 378 | } | ||
375 | } | 379 | } | ||
376 | 380 | | |||
377 | checkForUpdate(); | 381 | checkForUpdate(); | ||
378 | call->deleteLater(); | 382 | call->deleteLater(); | ||
379 | } | 383 | } | ||
▲ Show 20 Lines • Show All 115 Lines • Show Last 20 Lines |