Commit 227e2640 authored by Matthijs Tijink's avatar Matthijs Tijink Committed by Nicolas Fella

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
parent 71bf898d
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment