@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2016 Canonical, Ltd.
2+ * Copyright (C) 2017 Canonical, Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -17,6 +17,7 @@
1717#include "URLDispatcher.h"
1818
1919#include <QDBusConnection>
20+#include <QDebug>
2021
2122class URLDispatcherInterface : public QObject
2223{
@@ -63,7 +64,9 @@ void URLDispatcher::setActive(bool value)
6364 connection.registerObject(QStringLiteral("/com/canonical/URLDispatcher"),
6465 dispatcher,
6566 QDBusConnection::ExportScriptableContents);
66− connection.registerService(QStringLiteral("com.canonical.URLDispatcher"));
67+ if (!connection.registerService(QStringLiteral("com.canonical.URLDispatcher"))) {
68+ qWarning() << "Unable to register DBus service com.canonical.URLDispatcher";
69+ }
6770 m_dispatcher = dispatcher;
6871 } else {
6972 connection.unregisterService(QStringLiteral("com.canonical.URLDispatcher"));