summaryrefslogtreecommitdiffstats
path: root/tests/auto/unit/qvideosurfaceformat
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-04-05 09:26:21 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-04-05 07:35:55 +0000
commitf51c9010772e86d92740ed73ebae00567d980715 (patch)
tree462f5056c036033793644963cb68e1d282982de5 /tests/auto/unit/qvideosurfaceformat
parentf05ef30ec1eacea7582b268d77a5e8654af2fdd5 (diff)
Fix deprecation warnings about QVariant API
Fix warnings like: video/qvideosurfaceformat.cpp:522:47: warning: 'QVariant qVariantFromValue(const T&) [with T = QAbstractVideoBuffer::HandleType]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] video/qvideosurfaceformat.cpp:524:48: warning: 'QVariant qVariantFromValue(const T&) [with T = QVideoFrame::PixelFormat]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] video/qvideosurfaceformat.cpp:534:54: warning: 'QVariant qVariantFromValue(const T&) [with T = QVideoSurfaceFormat::Direction]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] video/qvideosurfaceformat.cpp:536:46: warning: 'QVariant qVariantFromValue(const T&) [with T = double]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] video/qvideosurfaceformat.cpp:538:53: warning: 'QVariant qVariantFromValue(const T&) [with T = QSize]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] video/qvideosurfaceformat.cpp:542:52: warning: 'QVariant qVariantFromValue(const T&) [with T = QVideoSurfaceFormat::YCbCrColorSpace]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] Task-number: QTBUG-74043 Change-Id: I95f3bba4e63d83d02183a76be41d3819e0f400d8 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
Diffstat (limited to 'tests/auto/unit/qvideosurfaceformat')
-rw-r--r--tests/auto/unit/qvideosurfaceformat/tst_qvideosurfaceformat.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/unit/qvideosurfaceformat/tst_qvideosurfaceformat.cpp b/tests/auto/unit/qvideosurfaceformat/tst_qvideosurfaceformat.cpp
index 5412a838d..4fa754a45 100644
--- a/tests/auto/unit/qvideosurfaceformat/tst_qvideosurfaceformat.cpp
+++ b/tests/auto/unit/qvideosurfaceformat/tst_qvideosurfaceformat.cpp
@@ -321,7 +321,7 @@ void tst_QVideoSurfaceFormat::scanLineDirection()
{
QVideoSurfaceFormat format(QSize(16, 16), QVideoFrame::Format_RGB32);
- format.setProperty("scanLineDirection", qVariantFromValue(direction));
+ format.setProperty("scanLineDirection", QVariant::fromValue(direction));
QCOMPARE(format.scanLineDirection(), direction);
QCOMPARE(
@@ -363,7 +363,7 @@ void tst_QVideoSurfaceFormat::yCbCrColorSpaceEnum()
}
{
QVideoSurfaceFormat format(QSize(64, 64), QVideoFrame::Format_RGB32);
- format.setProperty("yCbCrColorSpace", qVariantFromValue(colorspace));
+ format.setProperty("yCbCrColorSpace", QVariant::fromValue(colorspace));
QCOMPARE(format.yCbCrColorSpace(), colorspace);
QCOMPARE(qvariant_cast<QVideoSurfaceFormat::YCbCrColorSpace>(format.property("yCbCrColorSpace")),