From f787689e74dee63c55f2731683a4ede752fd9e44 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 5 Apr 2019 09:32:58 +0200 Subject: Fix some deprecation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tst_qvideoframe.cpp:736:68: warning: 'int QImage::byteCount() const' is deprecated: Use sizeInBytes [-Wdeprecated-declarations] videowidget.cpp:103:49: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] videowidget.cpp:111:62: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] Change-Id: If6ba7de74c695cb5405ef7d3f9c5be8f94e3e522 Reviewed-by: VaL Doroshchuk --- .../customvideosurface/customvideowidget/videowidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/multimediawidgets/customvideosurface/customvideowidget') diff --git a/examples/multimediawidgets/customvideosurface/customvideowidget/videowidget.cpp b/examples/multimediawidgets/customvideosurface/customvideowidget/videowidget.cpp index 513df4f31..12ac34a35 100644 --- a/examples/multimediawidgets/customvideosurface/customvideowidget/videowidget.cpp +++ b/examples/multimediawidgets/customvideosurface/customvideowidget/videowidget.cpp @@ -100,7 +100,7 @@ void VideoWidget::paintEvent(QPaintEvent *event) QRegion region = event->region(); region = region.subtracted(videoRect); - QBrush brush = palette().background(); + QBrush brush = palette().window(); for (const QRect &rect : region) painter.fillRect(rect, brush); @@ -108,7 +108,7 @@ void VideoWidget::paintEvent(QPaintEvent *event) surface->paint(&painter); } else { - painter.fillRect(event->rect(), palette().background()); + painter.fillRect(event->rect(), palette().window()); } } //! [3] -- cgit v1.2.3