From 227e264042f9ff9a6370d748e0dbdf2adfe3e5e6 Mon Sep 17 00:00:00 2001 From: Matthijs Tijink Date: Sun, 3 Dec 2017 19:18:19 +0100 Subject: [PATCH] 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 --- interfaces/dbusinterfaces.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interfaces/dbusinterfaces.cpp b/interfaces/dbusinterfaces.cpp index d15702dd9..eb390db6d 100644 --- a/interfaces/dbusinterfaces.cpp +++ b/interfaces/dbusinterfaces.cpp @@ -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;