Commit f787689e authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Fix some deprecation warnings


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: default avatarVaL Doroshchuk <valentyn.doroshchuk@qt.io>
parent b07a7d79
No related merge requests found
Showing with 3 additions and 3 deletions
......@@ -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]
......
......@@ -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);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment