From cd612d28121dc9bf9fc80d1804895771304dbf44 Mon Sep 17 00:00:00 2001 From: Levi Neely <141506390+lneely@users.noreply.github.com> Date: Sun, 19 Jul 2026 14:16:17 +0200 Subject: [PATCH] gui: recreate QDBusInterface on service restart QDBusInterface caches introspection data and can become stale after the backing service restarts. This caused ListSessions calls to silently fail, leaving the GUI empty after an olliesrv restart. Recreate m_iface in the serviceRegistered handler to ensure a fresh connection to the new service instance. --- plasmoid/plugin/olliedbusclient.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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]() {