troubleshooting dbus
This commit is contained in:
@@ -57,7 +57,7 @@ void LidWatcher::tryConnect() {
|
|||||||
QDBusConnection bus = QDBusConnection::systemBus();
|
QDBusConnection bus = QDBusConnection::systemBus();
|
||||||
|
|
||||||
const auto connected = bus.connect(
|
const auto connected = bus.connect(
|
||||||
kLogin1Service,
|
QString(),
|
||||||
kLogin1Path,
|
kLogin1Path,
|
||||||
kDBusPropertiesInterface,
|
kDBusPropertiesInterface,
|
||||||
"PropertiesChanged",
|
"PropertiesChanged",
|
||||||
|
|||||||
@@ -31,15 +31,17 @@ class LidWatcher : public QObject {
|
|||||||
private:
|
private:
|
||||||
void tryConnect();
|
void tryConnect();
|
||||||
void queryLidState();
|
void queryLidState();
|
||||||
void onPropertiesChanged(const QString& interface,
|
|
||||||
const QVariantMap& changed,
|
|
||||||
const QStringList& invalidated);
|
|
||||||
|
|
||||||
QDBusServiceWatcher* m_watcher;
|
QDBusServiceWatcher* m_watcher;
|
||||||
QTimer* m_pollTimer;
|
QTimer* m_pollTimer;
|
||||||
bool m_available;
|
bool m_available;
|
||||||
LidState m_state = Opened;
|
LidState m_state = Opened;
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void onPropertiesChanged(const QString& interface,
|
||||||
|
const QVariantMap& changed,
|
||||||
|
const QStringList& invalidated);
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void availableChanged();
|
void availableChanged();
|
||||||
void stateChanged();
|
void stateChanged();
|
||||||
|
|||||||
Reference in New Issue
Block a user