qt: Retain compatibility with Qt 5.9
authorNirbheek Chauhan <nirbheek@centricular.com>
Tue, 25 Jan 2022 09:35:47 +0000 (15:05 +0530)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 25 Jan 2022 09:51:16 +0000 (09:51 +0000)
QSharedPointer.get() was added in Qt 5.11, and it does the same thing
as .data()

https://doc.qt.io/qt-5/qsharedpointer.html#get

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/867

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1565>

subprojects/gst-plugins-good/tests/examples/qt/qmlsink-multisink/videoitem/videoitem.cpp

index 711c65dfd8ac2c5fdfb490ff0eb3f59f90ff6437..9d2bb09af194e2efc9b6e2a5c075808351956bbb 100644 (file)
@@ -151,7 +151,7 @@ VideoItem::VideoItem(QQuickItem *parent)
 
     // add watch
     _priv->bus = gst_pipeline_get_bus(GST_PIPELINE(_priv->pipeline));
-    gst_bus_set_sync_handler(_priv->bus, messageHandler, _priv.get(), nullptr);
+    gst_bus_set_sync_handler(_priv->bus, messageHandler, _priv.data(), nullptr);
 
     gst_element_set_state(_priv->pipeline, GST_STATE_READY);
     gst_element_get_state(_priv->pipeline, nullptr, nullptr, _priv->timeout * GST_MSECOND);