summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-04-05 09:32:58 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-04-05 08:30:09 +0000
commitf787689e74dee63c55f2731683a4ede752fd9e44 (patch)
tree9d71a760631092d5fd73062cef0a133a848a97c2
parentb07a7d79f3080892d381c40ec79679450bda5431 (diff)
Fix some deprecation warningsv5.13.0-beta2
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 <valentyn.doroshchuk@qt.io>
-rw-r--r--examples/multimediawidgets/customvideosurface/customvideowidget/videowidget.cpp4
-rw-r--r--tests/auto/unit/qvideoframe/tst_qvideoframe.cpp2
2 files changed, 3 insertions, 3 deletions
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]
diff --git a/tests/auto/unit/qvideoframe/tst_qvideoframe.cpp b/tests/auto/unit/qvideoframe/tst_qvideoframe.cpp
index 63307913b..6be039108 100644
--- a/tests/auto/unit/qvideoframe/tst_qvideoframe.cpp
+++ b/tests/auto/unit/qvideoframe/tst_qvideoframe.cpp
@@ -733,7 +733,7 @@ void tst_QVideoFrame::mapImage()
QVERIFY(frame.map(mode));
QVERIFY(frame.bits());
- QCOMPARE(frame.mappedBytes(), image.byteCount());
+ QCOMPARE(qsizetype(frame.mappedBytes()), image.sizeInBytes());
QCOMPARE(frame.bytesPerLine(), image.bytesPerLine());
QCOMPARE(frame.mapMode(), mode);