Changeset View
Changeset View
Standalone View
Standalone View
src/qml/plugin.cpp
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Line(s) | 51 | { | |||
---|---|---|---|---|---|
65 | qmlRegisterType<VolumeFeedback>(uri, 0, 1, "VolumeFeedback"); | 65 | qmlRegisterType<VolumeFeedback>(uri, 0, 1, "VolumeFeedback"); | ||
66 | qmlRegisterSingletonType(uri, 0, 1, "PulseAudio", pulseaudio_singleton); | 66 | qmlRegisterSingletonType(uri, 0, 1, "PulseAudio", pulseaudio_singleton); | ||
67 | qmlRegisterSingletonType<MicrophoneIndicator>(uri, 0, 1, "MicrophoneIndicator", | 67 | qmlRegisterSingletonType<MicrophoneIndicator>(uri, 0, 1, "MicrophoneIndicator", | ||
68 | [](QQmlEngine *engine, QJSEngine *jsEngine) -> QObject* { | 68 | [](QQmlEngine *engine, QJSEngine *jsEngine) -> QObject* { | ||
69 | Q_UNUSED(engine); | 69 | Q_UNUSED(engine); | ||
70 | Q_UNUSED(jsEngine); | 70 | Q_UNUSED(jsEngine); | ||
71 | return new MicrophoneIndicator(); | 71 | return new MicrophoneIndicator(); | ||
72 | }); | 72 | }); | ||
73 | 73 | #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) | |||
74 | qmlRegisterType<QPulseAudio::Client>(); | 74 | qmlRegisterType<QPulseAudio::Client>(); | ||
75 | qmlRegisterType<QPulseAudio::Sink>(); | 75 | qmlRegisterType<QPulseAudio::Sink>(); | ||
76 | qmlRegisterType<QPulseAudio::Source>(); | 76 | qmlRegisterType<QPulseAudio::Source>(); | ||
77 | #else | ||||
78 | qmlRegisterAnonymousType<QPulseAudio::Client>(uri, 1); | ||||
79 | qmlRegisterAnonymousType<QPulseAudio::Sink>(uri, 1); | ||||
80 | qmlRegisterAnonymousType<QPulseAudio::Source>(uri, 1); | ||||
81 | #endif | ||||
77 | } | 82 | } |