Fix "error activiting kdeconnectd" for kdeconnect-cli
Summary: Kdeconnect-cli always displayed one or more "error activating kdeconnectd: QDBusError("", "")" messages. This diff uses the reply of starting the kdeconnect daemon correctly, so this does not happen anymore. Test Plan: Kdeconnect-cli and the daemon still work, but kdeconnect-cli does not show the error message anymore. I verified that if, for some reason, the daemon could not start, it does display an error. Reviewers: #kde_connect, apol Reviewed By: #kde_connect, apol Subscribers: apol Differential Revision: https://phabricator.kde.org/D9058
This commit is contained in:
parent
71bf898d46
commit
227e264042
1 changed files with 2 additions and 2 deletions
|
@ -22,8 +22,8 @@
|
|||
|
||||
QString DaemonDbusInterface::activatedService() {
|
||||
static const QString service = QStringLiteral("org.kde.kdeconnect");
|
||||
QDBusConnection::sessionBus().interface()->startService(service);
|
||||
if (!QDBusConnection::sessionBus().interface()->isValid()) {
|
||||
auto reply = QDBusConnection::sessionBus().interface()->startService(service);
|
||||
if (!reply.isValid()) {
|
||||
qWarning() << "error activating kdeconnectd:" << QDBusConnection::sessionBus().interface()->lastError();
|
||||
}
|
||||
return service;
|
||||
|
|
Loading…
Reference in a new issue