Changeset View
Changeset View
Standalone View
Standalone View
plasmoid/declarativeplugin/kdeconnectdeclarativeplugin.cpp
Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Line(s) | |||||
80 | } | 80 | } | ||
81 | 81 | | |||
82 | void KdeConnectDeclarativePlugin::registerTypes(const char* uri) | 82 | void KdeConnectDeclarativePlugin::registerTypes(const char* uri) | ||
83 | { | 83 | { | ||
84 | qmlRegisterType<DevicesModel>(uri, 1, 0, "DevicesModel"); | 84 | qmlRegisterType<DevicesModel>(uri, 1, 0, "DevicesModel"); | ||
85 | qmlRegisterType<NotificationsModel>(uri, 1, 0, "NotificationsModel"); | 85 | qmlRegisterType<NotificationsModel>(uri, 1, 0, "NotificationsModel"); | ||
86 | qmlRegisterType<DBusAsyncResponse>(uri, 1, 0, "DBusAsyncResponse"); | 86 | qmlRegisterType<DBusAsyncResponse>(uri, 1, 0, "DBusAsyncResponse"); | ||
87 | qmlRegisterType<DevicesSortProxyModel>(uri, 1, 0, "DevicesSortProxyModel"); | 87 | qmlRegisterType<DevicesSortProxyModel>(uri, 1, 0, "DevicesSortProxyModel"); | ||
88 | #ifndef SAILFISHOS | ||||
88 | qmlRegisterUncreatableType<MprisDbusInterface>(uri, 1, 0, "MprisDbusInterface", QStringLiteral("You're not supposed to instantiate interfacess")); | 89 | qmlRegisterUncreatableType<MprisDbusInterface>(uri, 1, 0, "MprisDbusInterface", QStringLiteral("You're not supposed to instantiate interfacess")); | ||
89 | qmlRegisterUncreatableType<LockDeviceDbusInterface>(uri, 1, 0, "LockDeviceDbusInterface", QStringLiteral("You're not supposed to instantiate interfacess")); | 90 | qmlRegisterUncreatableType<LockDeviceDbusInterface>(uri, 1, 0, "LockDeviceDbusInterface", QStringLiteral("You're not supposed to instantiate interfacess")); | ||
90 | qmlRegisterUncreatableType<FindMyPhoneDeviceDbusInterface>(uri, 1, 0, "FindMyPhoneDbusInterface", QStringLiteral("You're not supposed to instantiate interfacess")); | 91 | qmlRegisterUncreatableType<FindMyPhoneDeviceDbusInterface>(uri, 1, 0, "FindMyPhoneDbusInterface", QStringLiteral("You're not supposed to instantiate interfacess")); | ||
91 | qmlRegisterUncreatableType<RemoteKeyboardDbusInterface>(uri, 1, 0, "RemoteKeyboardDbusInterface", QStringLiteral("You're not supposed to instantiate interfacess")); | 92 | qmlRegisterUncreatableType<RemoteKeyboardDbusInterface>(uri, 1, 0, "RemoteKeyboardDbusInterface", QStringLiteral("You're not supposed to instantiate interfacess")); | ||
93 | #endif | ||||
92 | qmlRegisterUncreatableType<DeviceDbusInterface>(uri, 1, 0, "DeviceDbusInterface", QStringLiteral("You're not supposed to instantiate interfacess")); | 94 | qmlRegisterUncreatableType<DeviceDbusInterface>(uri, 1, 0, "DeviceDbusInterface", QStringLiteral("You're not supposed to instantiate interfacess")); | ||
93 | qmlRegisterSingletonType<DaemonDbusInterface>(uri, 1, 0, "DaemonDbusInterface", | 95 | qmlRegisterSingletonType<DaemonDbusInterface>(uri, 1, 0, "DaemonDbusInterface", | ||
94 | [](QQmlEngine*, QJSEngine*) -> QObject* { | 96 | [](QQmlEngine*, QJSEngine*) -> QObject* { | ||
95 | return new DaemonDbusInterface; | 97 | return new DaemonDbusInterface; | ||
96 | } | 98 | } | ||
97 | ); | 99 | ); | ||
98 | } | 100 | } | ||
99 | 101 | | |||
Show All 34 Lines |