Changeset View
Changeset View
Standalone View
Standalone View
src/context/applets/info/plugin/InfoPlugin.cpp
Show All 26 Lines | |||||
27 | 27 | | |||
28 | 28 | | |||
29 | class InfoPlugin : public QQmlExtensionPlugin | 29 | class InfoPlugin : public QQmlExtensionPlugin | ||
30 | { | 30 | { | ||
31 | Q_OBJECT | 31 | Q_OBJECT | ||
32 | Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) | 32 | Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) | ||
33 | 33 | | |||
34 | public: | 34 | public: | ||
35 | void registerTypes(const char* uri) Q_DECL_OVERRIDE | 35 | void registerTypes(const char* uri) override | ||
36 | { | 36 | { | ||
37 | Q_ASSERT(uri == QLatin1String("org.kde.amarok.info")); | 37 | Q_ASSERT(uri == QLatin1String("org.kde.amarok.info")); | ||
38 | 38 | | |||
39 | qmlRegisterSingletonType<InfoEngine>(uri, 1, 0, "InfoEngine", info_engine_provider); | 39 | qmlRegisterSingletonType<InfoEngine>(uri, 1, 0, "InfoEngine", info_engine_provider); | ||
40 | } | 40 | } | ||
41 | 41 | | |||
42 | static QObject *info_engine_provider(QQmlEngine *engine, QJSEngine *scriptEngine) | 42 | static QObject *info_engine_provider(QQmlEngine *engine, QJSEngine *scriptEngine) | ||
43 | { | 43 | { | ||
44 | Q_UNUSED(engine) | 44 | Q_UNUSED(engine) | ||
45 | Q_UNUSED(scriptEngine) | 45 | Q_UNUSED(scriptEngine) | ||
46 | 46 | | |||
47 | return new InfoEngine(); | 47 | return new InfoEngine(); | ||
48 | } | 48 | } | ||
49 | }; | 49 | }; | ||
50 | 50 | | |||
51 | #include <InfoPlugin.moc> | 51 | #include <InfoPlugin.moc> |