Changeset View
Changeset View
Standalone View
Standalone View
interfaces/dbusinterfaces.cpp
Show All 16 Lines | |||||
17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #include "dbusinterfaces.h" | 21 | #include "dbusinterfaces.h" | ||
22 | 22 | | |||
23 | QString DaemonDbusInterface::activatedService() { | 23 | QString DaemonDbusInterface::activatedService() { | ||
24 | static const QString service = QStringLiteral("org.kde.kdeconnect"); | 24 | static const QString service = QStringLiteral("org.kde.kdeconnect"); | ||
25 | QDBusConnection::sessionBus().interface()->startService(service); | 25 | auto reply = QDBusConnection::sessionBus().interface()->startService(service); | ||
26 | if (!QDBusConnection::sessionBus().interface()->isValid()) { | 26 | if (!reply.isValid()) { | ||
27 | qWarning() << "error activating kdeconnectd:" << QDBusConnection::sessionBus().interface()->lastError(); | 27 | qWarning() << "error activating kdeconnectd:" << QDBusConnection::sessionBus().interface()->lastError(); | ||
28 | } | 28 | } | ||
29 | return service; | 29 | return service; | ||
30 | } | 30 | } | ||
31 | 31 | | |||
32 | DaemonDbusInterface::DaemonDbusInterface(QObject* parent) | 32 | DaemonDbusInterface::DaemonDbusInterface(QObject* parent) | ||
33 | : OrgKdeKdeconnectDaemonInterface(DaemonDbusInterface::activatedService(), QStringLiteral("/modules/kdeconnect"), QDBusConnection::sessionBus(), parent) | 33 | : OrgKdeKdeconnectDaemonInterface(DaemonDbusInterface::activatedService(), QStringLiteral("/modules/kdeconnect"), QDBusConnection::sessionBus(), parent) | ||
34 | { | 34 | { | ||
▲ Show 20 Lines • Show All 134 Lines • Show Last 20 Lines |