troubleshooting dbus
This commit is contained in:
@@ -57,7 +57,7 @@ void LidWatcher::tryConnect() {
|
||||
QDBusConnection bus = QDBusConnection::systemBus();
|
||||
|
||||
const auto connected = bus.connect(
|
||||
kLogin1Service,
|
||||
QString(),
|
||||
kLogin1Path,
|
||||
kDBusPropertiesInterface,
|
||||
"PropertiesChanged",
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user