qt: Fix build for Qt 5.9
authorPhilippe Normand <philn@igalia.com>
Tue, 31 Aug 2021 10:05:16 +0000 (11:05 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 31 Aug 2021 11:15:24 +0000 (11:15 +0000)
The QQuickItem::size() method was introduced in 5.10, so use direct width() and
height() access instead.

Fixes #908

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1069>

ext/qt/qtitem.cc

index e042b2f..4ac349e 100644 (file)
@@ -308,15 +308,15 @@ QtGLVideoItem::fitStreamToAllocatedSize(GstVideoRectangle * result)
 
     dst.x = 0;
     dst.y = 0;
-    dst.w = size().width();
-    dst.h = size().height();
+    dst.w = width();
+    dst.h = height();
 
     gst_video_sink_center_rect (src, dst, result, TRUE);
   } else {
     result->x = 0;
     result->y = 0;
-    result->w = size().width();
-    result->h = size().height();
+    result->w = width();
+    result->h = height();
   }
 }