summaryrefslogtreecommitdiffstats
path: root/tests/auto
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
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')
-rw-r--r--tests/auto/unit/qmediaplayer/tst_qmediaplayer.cpp4
-rw-r--r--tests/auto/unit/qvideosurfaceformat/tst_qvideosurfaceformat.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/unit/qmediaplayer/tst_qmediaplayer.cpp b/tests/auto/unit/qmediaplayer/tst_qmediaplayer.cpp
index 94d297ad0..871ff3cc7 100644
--- a/tests/auto/unit/qmediaplayer/tst_qmediaplayer.cpp
+++ b/tests/auto/unit/qmediaplayer/tst_qmediaplayer.cpp
@@ -1329,7 +1329,7 @@ void tst_QMediaPlayer::testAudioRole()
spy.clear();
- player.setProperty("audioRole", qVariantFromValue(QAudio::AlarmRole));
+ player.setProperty("audioRole", QVariant::fromValue(QAudio::AlarmRole));
QCOMPARE(qvariant_cast<QAudio::Role>(player.property("audioRole")), QAudio::AlarmRole);
QCOMPARE(mockService->mockAudioRoleControl->audioRole(), QAudio::AlarmRole);
QCOMPARE(spy.count(), 1);
@@ -1397,7 +1397,7 @@ void tst_QMediaPlayer::testCustomAudioRole()
spyCustomRole.clear();
QString customRole2(QStringLiteral("customRole2"));
- player.setProperty("customAudioRole", qVariantFromValue(customRole2));
+ player.setProperty("customAudioRole", QVariant::fromValue(customRole2));
QCOMPARE(qvariant_cast<QString>(player.property("customAudioRole")), customRole2);
QCOMPARE(mockService->mockCustomAudioRoleControl->customAudioRole(), customRole2);
QCOMPARE(spyRole.count(), 0);
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")),