From deef85d10cd788785561a95a967bb173b8e2f8ca Mon Sep 17 00:00:00 2001 From: AramJonghu Date: Wed, 3 Jun 2026 17:02:46 +0200 Subject: [PATCH] troubleshooting dbus --- Plugins/ZShell/lidwatcher.cpp | 2 +- Plugins/ZShell/lidwatcher.hpp | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Plugins/ZShell/lidwatcher.cpp b/Plugins/ZShell/lidwatcher.cpp index 20036e0..212209c 100644 --- a/Plugins/ZShell/lidwatcher.cpp +++ b/Plugins/ZShell/lidwatcher.cpp @@ -57,7 +57,7 @@ void LidWatcher::tryConnect() { QDBusConnection bus = QDBusConnection::systemBus(); const auto connected = bus.connect( - kLogin1Service, + QString(), kLogin1Path, kDBusPropertiesInterface, "PropertiesChanged", diff --git a/Plugins/ZShell/lidwatcher.hpp b/Plugins/ZShell/lidwatcher.hpp index e7685ec..ec74ca1 100644 --- a/Plugins/ZShell/lidwatcher.hpp +++ b/Plugins/ZShell/lidwatcher.hpp @@ -31,15 +31,17 @@ class LidWatcher : public QObject { private: void tryConnect(); void queryLidState(); - void onPropertiesChanged(const QString& interface, - const QVariantMap& changed, - const QStringList& invalidated); QDBusServiceWatcher* m_watcher; QTimer* m_pollTimer; bool m_available; LidState m_state = Opened; + private Q_SLOTS: + void onPropertiesChanged(const QString& interface, + const QVariantMap& changed, + const QStringList& invalidated); + Q_SIGNALS: void availableChanged(); void stateChanged();