Debian Codegraph @

online-accounts-client/lib/module/plugin.cpp

raw symbols SCIP
1 /*
2 * Copyright (C) 2013 Canonical Ltd.
3 *
4 * Contact: Alberto Mardegan <[email protected]>
5 *
6 * This file is part of OnlineAccountsClient.
7 *
8 * OnlineAccountsClient is free software: you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License as
10 * published by the Free Software Foundation, either version 3 of the
11 * License, or (at your option) any later version.
12 *
13 * OnlineAccountsClient is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with OnlineAccountsClient. If not, see
20 * <http://www.gnu.org/licenses/>.
21 */
22
23 #include "plugin.h"
24 #include <LomiriOnlineAccountsClient/Setup>
25 #include <QDebug>
26 #include <QQmlComponent>
27
28 #ifdef LOMIRI_ONLINEACCOUNTS_UBUNTU_COMPAT
29 #include <QLoggingCategory>
30
31 Q_LOGGING_CATEGORY(ldCategory, "lomiri.deprecations", QtWarningMsg)
32 #endif
33
34 using namespace OnlineAccountsClient;
35
36 void Plugin::registerTypes(const char *uri)
37 {
38 qDebug() << Q_FUNC_INFO << uri;
39 qmlRegisterType<Setup>(uri, 0, 1, "Setup");
40 qmlRegisterType<Setup,2>(uri, 0, 2, "Setup");
41
42 #ifdef LOMIRI_ONLINEACCOUNTS_UBUNTU_COMPAT
43 if (uri == QLatin1String("Ubuntu.OnlineAccounts.Client")) {
44 qCDebug(ldCategory, "Use of the Ubuntu.OnlineAccounts.Client namespace "
45 "is deprecated, please consider updating your "
46 "applications to import "
47 "Lomiri.OnlineAccounts.Client instead.");
48 }
49 #endif
50 }