diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-04-05 09:26:21 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-04-05 07:35:55 +0000 |
commit | f51c9010772e86d92740ed73ebae00567d980715 (patch) | |
tree | 462f5056c036033793644963cb68e1d282982de5 /tests/auto/unit/qmediaplayer | |
parent | f05ef30ec1eacea7582b268d77a5e8654af2fdd5 (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/qmediaplayer')
-rw-r--r-- | tests/auto/unit/qmediaplayer/tst_qmediaplayer.cpp | 4 |
1 files changed, 2 insertions, 2 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); |