[Effects] QDBusAbstractInterface needs valid object path
I noticed that the GetActive call fails with an "Object path cannot be empty" error when stealing that code for PowerDevil. Differential Revision: https://phabricator.kde.org/D1910
This commit is contained in:
parent
4560f8d253
commit
2c47bdab3c
1 changed files with 1 additions and 1 deletions
|
@ -104,7 +104,7 @@ void ScreenLockerWatcher::serviceOwnerChanged(const QString &serviceName, const
|
|||
m_interface = NULL;
|
||||
m_locked = false;
|
||||
if (!newOwner.isEmpty()) {
|
||||
m_interface = new OrgFreedesktopScreenSaverInterface(newOwner, QString(), QDBusConnection::sessionBus(), this);
|
||||
m_interface = new OrgFreedesktopScreenSaverInterface(newOwner, QStringLiteral("/ScreenSaver"), QDBusConnection::sessionBus(), this);
|
||||
connect(m_interface, SIGNAL(ActiveChanged(bool)), SLOT(setLocked(bool)));
|
||||
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(m_interface->GetActive(), this);
|
||||
connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(activeQueried(QDBusPendingCallWatcher*)));
|
||||
|
|
Loading…
Reference in a new issue