diff --git a/plasmoid/plugin/olliedbusclient.cpp b/plasmoid/plugin/olliedbusclient.cpp index 0d2f11d..0a24861 100644 --- a/plasmoid/plugin/olliedbusclient.cpp +++ b/plasmoid/plugin/olliedbusclient.cpp @@ -25,6 +25,11 @@ OllieDBusClient::OllieDBusClient(QObject *parent) QDBusServiceWatcher::WatchForRegistration | QDBusServiceWatcher::WatchForUnregistration, this); connect(watcher, &QDBusServiceWatcher::serviceRegistered, this, [this]() { + // Recreate the interface — QDBusInterface caches introspection and can + // become stale after the service restarts. + delete m_iface; + m_iface = new QDBusInterface(SERVICE, OBJ_PATH, IFACE, + QDBusConnection::sessionBus(), this); refreshSessions(); }); connect(watcher, &QDBusServiceWatcher::serviceUnregistered, this, [this]() {