~ci-train-bot/unity8/unity8-ubuntu-zesty-2663

« back to all changes in this revision

Viewing changes to plugins/Utils/URLDispatcher.cpp

  • Committer: Nick Dedekind
  • Date: 2017-03-15 15:22:07 UTC
  • mfrom: (2868 unity8)
  • mto: This revision was merged to the branch mainline in revision 2892.
  • Revision ID: nick.dedekind@canonical.com-20170315152207-9ts6lyu1v2pruue2
merged with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2016 Canonical, Ltd.
 
2
 * Copyright (C) 2016-2017 Canonical, Ltd.
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify
5
5
 * it under the terms of the GNU General Public License as published by
17
17
#include "URLDispatcher.h"
18
18
 
19
19
#include <QDBusConnection>
 
20
#include <QDebug>
20
21
 
21
22
class URLDispatcherInterface : public QObject
22
23
{
63
64
        connection.registerObject(QStringLiteral("/com/canonical/URLDispatcher"),
64
65
                                  dispatcher,
65
66
                                  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
        }
67
70
        m_dispatcher = dispatcher;
68
71
    } else {
69
72
        connection.unregisterService(QStringLiteral("com.canonical.URLDispatcher"));