diff options
author | Tim Blechmann <[email protected]> | 2025-04-16 18:54:18 +0800 |
---|---|---|
committer | Tim Blechmann <[email protected]> | 2025-06-06 11:30:35 +0800 |
commit | 9d0aeceaccebf9c0f179bc1ef4106cc89dec240d (patch) | |
tree | 77e88fabe7babaa5f3989fd2de10d65bd115e497 /src | |
parent | 886c5a63f78a8a74b283dbacfccdfdccefd5f4c0 (diff) |
Pick-to: 6.8 6.9 6.10
Change-Id: I366491c7182081b22d24bcdeb8da9191c895e485
Reviewed-by: Artem Dyomin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/multimedia/pulseaudio/qpulseaudio_contextmanager.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/multimedia/pulseaudio/qpulseaudio_contextmanager.cpp b/src/multimedia/pulseaudio/qpulseaudio_contextmanager.cpp index e89478b5d..f368d5ebc 100644 --- a/src/multimedia/pulseaudio/qpulseaudio_contextmanager.cpp +++ b/src/multimedia/pulseaudio/qpulseaudio_contextmanager.cpp @@ -393,22 +393,23 @@ void QPulseAudioContextManager::prepare() std::unique_lock guard{ *this }; - pa_proplist *proplist = pa_proplist_new(); + PAProplistHandle proplist{ + pa_proplist_new(), + }; if (!QGuiApplication::applicationDisplayName().isEmpty()) - pa_proplist_sets(proplist, PA_PROP_APPLICATION_NAME, + pa_proplist_sets(proplist.get(), PA_PROP_APPLICATION_NAME, qUtf8Printable(QGuiApplication::applicationDisplayName())); if (!QGuiApplication::desktopFileName().isEmpty()) - pa_proplist_sets(proplist, PA_PROP_APPLICATION_ID, + pa_proplist_sets(proplist.get(), PA_PROP_APPLICATION_ID, qUtf8Printable(QGuiApplication::desktopFileName())); if (const QString windowIconName = QGuiApplication::windowIcon().name(); !windowIconName.isEmpty()) - pa_proplist_sets(proplist, PA_PROP_WINDOW_ICON_NAME, qUtf8Printable(windowIconName)); + pa_proplist_sets(proplist.get(), PA_PROP_WINDOW_ICON_NAME, qUtf8Printable(windowIconName)); m_context = PAContextHandle{ - pa_context_new_with_proplist(m_mainLoopApi, nullptr, proplist), + pa_context_new_with_proplist(m_mainLoopApi, nullptr, proplist.get()), PAContextHandle::HasRef, }; - pa_proplist_free(proplist); if (!m_context) { qCritical() << "PulseAudioService: Unable to create new pulseaudio context"; |