summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/integration/qaudiodecoderbackend/BLACKLIST2
-rw-r--r--tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp31
-rw-r--r--tests/auto/integration/qmediaplayerbackend/BLACKLIST14
-rw-r--r--tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp156
-rw-r--r--tests/auto/integration/qsoundeffect/BLACKLIST3
-rw-r--r--tests/auto/integration/qsoundeffect/qsoundeffect.pro2
-rw-r--r--tests/auto/unit/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp2
-rw-r--r--tests/auto/unit/qmediaobject/tst_qmediaobject.cpp2
-rw-r--r--tests/auto/unit/qpaintervideosurface/tst_qpaintervideosurface.cpp8
-rw-r--r--tests/auto/unit/qvideowidget/tst_qvideowidget.cpp2
10 files changed, 168 insertions, 54 deletions
diff --git a/tests/auto/integration/qaudiodecoderbackend/BLACKLIST b/tests/auto/integration/qaudiodecoderbackend/BLACKLIST
new file mode 100644
index 000000000..316c5a083
--- /dev/null
+++ b/tests/auto/integration/qaudiodecoderbackend/BLACKLIST
@@ -0,0 +1,2 @@
+# QTBUG-56796
+windows
diff --git a/tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp b/tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp
index 9529f1bc4..5035cb6b1 100644
--- a/tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp
+++ b/tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp
@@ -229,11 +229,6 @@ void tst_QCameraBackend::testCameraStates()
QTRY_COMPARE(camera.status(), QCamera::UnloadedStatus);
QCOMPARE(statusChangedSignal.last().first().value<QCamera::Status>(), QCamera::UnloadedStatus);
-#ifdef Q_WS_MAEMO_6
- //resource policy doesn't work correctly when resource is released and immediately requested again.
- QTest::qWait(250);
-#endif
-
camera.start();
QCOMPARE(camera.state(), QCamera::ActiveState);
QCOMPARE(stateChangedSignal.last().first().value<QCamera::State>(), QCamera::ActiveState);
@@ -386,10 +381,6 @@ void tst_QCameraBackend::testCaptureToBuffer()
camera.load();
-#ifdef Q_WS_MAEMO_6
- QVERIFY(imageCapture.isCaptureDestinationSupported(QCameraImageCapture::CaptureToBuffer));
-#endif
-
if (!imageCapture.isCaptureDestinationSupported(QCameraImageCapture::CaptureToBuffer))
QSKIP("Buffer capture not supported");
@@ -454,11 +445,6 @@ void tst_QCameraBackend::testCaptureToBuffer()
imageAvailableSignal.clear();
savedSignal.clear();
- //Capture to yuv buffer
-#ifdef Q_WS_MAEMO_6
- QVERIFY(imageCapture.supportedBufferFormats().contains(QVideoFrame::Format_UYVY));
-#endif
-
if (imageCapture.supportedBufferFormats().contains(QVideoFrame::Format_UYVY)) {
imageCapture.setBufferFormat(QVideoFrame::Format_UYVY);
QCOMPARE(imageCapture.bufferFormat(), QVideoFrame::Format_UYVY);
@@ -493,9 +479,6 @@ void tst_QCameraBackend::testCaptureToBuffer()
QTRY_VERIFY(imageCapture.isReadyForCapture());
//Try to capture to both buffer and file
-#ifdef Q_WS_MAEMO_6
- QVERIFY(imageCapture.isCaptureDestinationSupported(QCameraImageCapture::CaptureToBuffer | QCameraImageCapture::CaptureToFile));
-#endif
if (imageCapture.isCaptureDestinationSupported(QCameraImageCapture::CaptureToBuffer | QCameraImageCapture::CaptureToFile)) {
imageCapture.setCaptureDestination(QCameraImageCapture::CaptureToBuffer | QCameraImageCapture::CaptureToFile);
@@ -524,9 +507,7 @@ void tst_QCameraBackend::testCaptureToBuffer()
void tst_QCameraBackend::testCameraCaptureMetadata()
{
-#ifndef Q_WS_MAEMO_6
QSKIP("Capture metadata is supported only on harmattan");
-#endif
QCamera camera;
QCameraImageCapture imageCapture(&camera);
@@ -547,9 +528,7 @@ void tst_QCameraBackend::testCameraCaptureMetadata()
void tst_QCameraBackend::testExposureCompensation()
{
-#if !defined(Q_WS_MAEMO_6)
QSKIP("Capture exposure parameters are supported only on mobile platforms");
-#endif
QCamera camera;
QCameraExposure *exposure = camera.exposure();
@@ -594,16 +573,11 @@ void tst_QCameraBackend::testExposureCompensation()
void tst_QCameraBackend::testExposureMode()
{
-#if !defined(Q_WS_MAEMO_6)
QSKIP("Capture exposure parameters are supported only on mobile platforms");
-#endif
QCamera camera;
QCameraExposure *exposure = camera.exposure();
-#ifdef Q_WS_MAEMO_6
- QEXPECT_FAIL("", "Camerabin reports Manual exposure instead of Auto", Continue);
-#endif
QCOMPARE(exposure->exposureMode(), QCameraExposure::ExposureAuto);
// Night
@@ -616,11 +590,6 @@ void tst_QCameraBackend::testExposureMode()
camera.unload();
QTRY_COMPARE(camera.status(), QCamera::UnloadedStatus);
-#ifdef Q_WS_MAEMO_6
- //resource policy doesn't work correctly when resource is released and immediately requested again.
- QTest::qWait(250);
-#endif
-
// Auto
exposure->setExposureMode(QCameraExposure::ExposureAuto);
QCOMPARE(exposure->exposureMode(), QCameraExposure::ExposureAuto);
diff --git a/tests/auto/integration/qmediaplayerbackend/BLACKLIST b/tests/auto/integration/qmediaplayerbackend/BLACKLIST
index 5560abf75..e826fc079 100644
--- a/tests/auto/integration/qmediaplayerbackend/BLACKLIST
+++ b/tests/auto/integration/qmediaplayerbackend/BLACKLIST
@@ -7,15 +7,13 @@ osx-10.11
windows 32bit developer-build
windows 64bit developer-build
-[construction]
+# Media player plugin not built at the moment on this platform
opensuse-13.1 64bit
[loadMedia]
-opensuse-13.1 64bit
windows 64bit developer-build
[unloadMedia]
-opensuse-13.1 64bit
windows 64bit developer-build
[playPauseStop]
@@ -23,25 +21,15 @@ linux
windows 64bit developer-build
[processEOS]
-opensuse-13.1 64bit
windows 64bit developer-build
[deleteLaterAtEOS]
-opensuse-13.1 64bit
windows 64bit developer-build
-[volumeAndMuted]
-opensuse-13.1 64bit
-
-[volumeAcrossFiles]
-opensuse-13.1 64bit
-
[initialVolume]
-opensuse-13.1 64bit
windows 64bit developer-build
[playlist]
-opensuse-13.1 64bit
redhatenterpriselinuxworkstation-6.6
[seekPauseSeek]
diff --git a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
index 1f1df9aac..e60ea2cd7 100644
--- a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
+++ b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
@@ -71,6 +71,7 @@ private slots:
void subsequentPlayback();
void probes();
void playlist();
+ void playlistObject();
void surfaceTest_data();
void surfaceTest();
void metadata();
@@ -993,6 +994,7 @@ void tst_QMediaPlayerBackend::playlist()
QSignalSpy mediaSpy(&player, SIGNAL(mediaChanged(QMediaContent)));
QSignalSpy currentMediaSpy(&player, SIGNAL(currentMediaChanged(QMediaContent)));
QSignalSpy stateSpy(&player, SIGNAL(stateChanged(QMediaPlayer::State)));
+ QSignalSpy mediaStatusSpy(&player, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)));
QSignalSpy errorSpy(&player, SIGNAL(error(QMediaPlayer::Error)));
QFileInfo fileInfo(QFINDTESTDATA("testdata/sample.m3u"));
@@ -1001,8 +1003,8 @@ void tst_QMediaPlayerBackend::playlist()
player.play();
QTRY_COMPARE_WITH_TIMEOUT(player.state(), QMediaPlayer::StoppedState, 10000);
- if (player.mediaStatus() == QMediaPlayer::InvalidMedia)
- QSKIP("Media player does not support M3U playlists");
+ if (player.mediaStatus() == QMediaPlayer::InvalidMedia || mediaSpy.count() == 1)
+ QSKIP("QMediaPlayer does not support loading M3U playlists as QMediaPlaylist");
QCOMPARE(mediaSpy.count(), 2);
// sample.m3u -> sample.m3u resolved -> test.wav ->
@@ -1015,10 +1017,12 @@ void tst_QMediaPlayerBackend::playlist()
QCOMPARE(currentMediaSpy.count(), 11);
QCOMPARE(stateSpy.count(), 2);
QCOMPARE(errorSpy.count(), 0);
+ QCOMPARE(mediaStatusSpy.count(), 19); // 6 x (LoadingMedia -> BufferedMedia -> EndOfMedia) + NoMedia
mediaSpy.clear();
currentMediaSpy.clear();
stateSpy.clear();
+ mediaStatusSpy.clear();
errorSpy.clear();
player.play();
@@ -1027,10 +1031,12 @@ void tst_QMediaPlayerBackend::playlist()
QCOMPARE(currentMediaSpy.count(), 8);
QCOMPARE(stateSpy.count(), 2);
QCOMPARE(errorSpy.count(), 0);
+ QCOMPARE(mediaStatusSpy.count(), 19); // 6 x (LoadingMedia -> BufferedMedia -> EndOfMedia) + NoMedia
mediaSpy.clear();
currentMediaSpy.clear();
stateSpy.clear();
+ mediaStatusSpy.clear();
errorSpy.clear();
// <<< Invalid - 1st pass >>>
@@ -1045,10 +1051,12 @@ void tst_QMediaPlayerBackend::playlist()
QCOMPARE(currentMediaSpy.count(), 4);
QCOMPARE(stateSpy.count(), 2);
QCOMPARE(errorSpy.count(), 1);
+ QCOMPARE(mediaStatusSpy.count(), 3); // LoadingMedia -> InvalidMedia -> NoMedia
mediaSpy.clear();
currentMediaSpy.clear();
stateSpy.clear();
+ mediaStatusSpy.clear();
errorSpy.clear();
// <<< Invalid - 2nd pass >>>
@@ -1060,10 +1068,12 @@ void tst_QMediaPlayerBackend::playlist()
QCOMPARE(currentMediaSpy.count(), 3);
QCOMPARE(stateSpy.count(), 2);
QCOMPARE(errorSpy.count(), 1);
+ QCOMPARE(mediaStatusSpy.count(), 3); // LoadingMedia -> InvalidMedia -> NoMedia
mediaSpy.clear();
currentMediaSpy.clear();
stateSpy.clear();
+ mediaStatusSpy.clear();
errorSpy.clear();
// <<< Invalid2 - 1st pass >>>
@@ -1078,10 +1088,12 @@ void tst_QMediaPlayerBackend::playlist()
QCOMPARE(currentMediaSpy.count(), 6);
QCOMPARE(stateSpy.count(), 2);
QCOMPARE(errorSpy.count(), 1);
+ QCOMPARE(mediaStatusSpy.count(), 9); // 3 x LoadingMedia + 2 x (BufferedMedia -> EndOfMedia) + InvalidMedia + NoMedia (not in this order)
mediaSpy.clear();
currentMediaSpy.clear();
stateSpy.clear();
+ mediaStatusSpy.clear();
errorSpy.clear();
// <<< Invalid2 - 2nd pass >>>
@@ -1093,10 +1105,12 @@ void tst_QMediaPlayerBackend::playlist()
QCOMPARE(currentMediaSpy.count(), 5);
QCOMPARE(stateSpy.count(), 2);
QCOMPARE(errorSpy.count(), 1);
+ QCOMPARE(mediaStatusSpy.count(), 9); // 3 x LoadingMedia + 2 x (BufferedMedia -> EndOfMedia) + InvalidMedia + NoMedia (not in this order)
mediaSpy.clear();
currentMediaSpy.clear();
stateSpy.clear();
+ mediaStatusSpy.clear();
errorSpy.clear();
// <<< Recursive - 1st pass >>>
@@ -1115,10 +1129,13 @@ void tst_QMediaPlayerBackend::playlist()
QCOMPARE(stateSpy.count(), 2);
// there is one invalid media in the master playlist
QCOMPARE(errorSpy.count(), 1);
+ QCOMPARE(mediaStatusSpy.count(), 6); // LoadingMedia -> InvalidMedia -> LoadingMedia -> BufferedMedia
+ // -> EndOfMedia -> NoMedia
mediaSpy.clear();
currentMediaSpy.clear();
stateSpy.clear();
+ mediaStatusSpy.clear();
errorSpy.clear();
// <<< Recursive - 2nd pass >>>
@@ -1133,6 +1150,141 @@ void tst_QMediaPlayerBackend::playlist()
QCOMPARE(stateSpy.count(), 2);
// there is one invalid media in the master playlist
QCOMPARE(errorSpy.count(), 1);
+ QCOMPARE(mediaStatusSpy.count(), 6); // LoadingMedia -> InvalidMedia -> LoadingMedia -> BufferedMedia
+ // -> EndOfMedia -> NoMedia
+}
+
+void tst_QMediaPlayerBackend::playlistObject()
+{
+ QMediaPlayer player;
+
+ QSignalSpy mediaSpy(&player, SIGNAL(mediaChanged(QMediaContent)));
+ QSignalSpy currentMediaSpy(&player, SIGNAL(currentMediaChanged(QMediaContent)));
+ QSignalSpy stateSpy(&player, SIGNAL(stateChanged(QMediaPlayer::State)));
+ QSignalSpy mediaStatusSpy(&player, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)));
+ QSignalSpy errorSpy(&player, SIGNAL(error(QMediaPlayer::Error)));
+
+ // --- empty playlist
+ QMediaPlaylist emptyPlaylist;
+ player.setPlaylist(&emptyPlaylist);
+
+ player.play();
+ QTRY_COMPARE_WITH_TIMEOUT(player.state(), QMediaPlayer::StoppedState, 10000);
+
+ QCOMPARE(mediaSpy.count(), 1);
+ QCOMPARE(currentMediaSpy.count(), 1); // Empty media
+ QCOMPARE(stateSpy.count(), 0);
+ QCOMPARE(errorSpy.count(), 0);
+ QCOMPARE(mediaStatusSpy.count(), 0);
+
+ mediaSpy.clear();
+ currentMediaSpy.clear();
+ stateSpy.clear();
+ mediaStatusSpy.clear();
+ errorSpy.clear();
+
+ // --- Valid playlist
+ QMediaPlaylist playlist;
+ playlist.addMedia(QUrl::fromLocalFile(QFileInfo(QFINDTESTDATA("testdata/test.wav")).absoluteFilePath()));
+ playlist.addMedia(QUrl::fromLocalFile(QFileInfo(QFINDTESTDATA("testdata/_test.wav")).absoluteFilePath()));
+ player.setPlaylist(&playlist);
+
+ player.play();
+ QTRY_COMPARE_WITH_TIMEOUT(player.state(), QMediaPlayer::StoppedState, 10000);
+
+ QCOMPARE(mediaSpy.count(), 1);
+ QCOMPARE(currentMediaSpy.count(), 3); // test.wav -> _test.wav -> NoMedia
+ QCOMPARE(stateSpy.count(), 2);
+ QCOMPARE(errorSpy.count(), 0);
+ QCOMPARE(mediaStatusSpy.count(), 7); // 2 x (LoadingMedia -> BufferedMedia -> EndOfMedia) + NoMedia
+
+ mediaSpy.clear();
+ currentMediaSpy.clear();
+ stateSpy.clear();
+ mediaStatusSpy.clear();
+ errorSpy.clear();
+
+ player.play();
+ QTRY_COMPARE_WITH_TIMEOUT(player.state(), QMediaPlayer::StoppedState, 10000);
+
+ QCOMPARE(mediaSpy.count(), 0);
+ QCOMPARE(currentMediaSpy.count(), 4); // playlist -> test.wav -> _test.wav -> NoMedia
+ QCOMPARE(stateSpy.count(), 2);
+ QCOMPARE(errorSpy.count(), 0);
+ QCOMPARE(mediaStatusSpy.count(), 7); // 2 x (LoadingMedia -> BufferedMedia -> EndOfMedia) + NoMedia
+
+ player.setPlaylist(Q_NULLPTR);
+
+ mediaSpy.clear();
+ currentMediaSpy.clear();
+ stateSpy.clear();
+ mediaStatusSpy.clear();
+ errorSpy.clear();
+
+ // --- Nested playlist
+ QMediaPlaylist nestedPlaylist;
+ nestedPlaylist.addMedia(QUrl::fromLocalFile(QFileInfo(QFINDTESTDATA("testdata/_test.wav")).absoluteFilePath()));
+ nestedPlaylist.addMedia(QUrl::fromLocalFile(QFileInfo(QFINDTESTDATA("testdata/test.wav")).absoluteFilePath()));
+ nestedPlaylist.addMedia(&playlist);
+ player.setPlaylist(&nestedPlaylist);
+
+ player.play();
+ QTRY_COMPARE_WITH_TIMEOUT(player.state(), QMediaPlayer::StoppedState, 10000);
+
+ QCOMPARE(mediaSpy.count(), 1);
+ QCOMPARE(currentMediaSpy.count(), 6); // _test.wav -> test.wav -> nested playlist
+ // -> test.wav -> _test.wav -> NoMedia
+ QCOMPARE(stateSpy.count(), 2);
+ QCOMPARE(errorSpy.count(), 0);
+ QCOMPARE(mediaStatusSpy.count(), 13); // 4 x (LoadingMedia -> BufferedMedia -> EndOfMedia) + NoMedia
+
+ player.setPlaylist(Q_NULLPTR);
+
+ mediaSpy.clear();
+ currentMediaSpy.clear();
+ stateSpy.clear();
+ mediaStatusSpy.clear();
+ errorSpy.clear();
+
+ // --- playlist with invalid media
+ QMediaPlaylist invalidPlaylist;
+ invalidPlaylist.addMedia(QUrl("invalid"));
+ invalidPlaylist.addMedia(QUrl::fromLocalFile(QFileInfo(QFINDTESTDATA("testdata/test.wav")).absoluteFilePath()));
+
+ player.setPlaylist(&invalidPlaylist);
+
+ player.play();
+ QTRY_COMPARE_WITH_TIMEOUT(player.state(), QMediaPlayer::StoppedState, 10000);
+
+ QCOMPARE(mediaSpy.count(), 1);
+ QCOMPARE(currentMediaSpy.count(), 3); // invalid -> test.wav -> NoMedia
+ QCOMPARE(stateSpy.count(), 2);
+ QCOMPARE(errorSpy.count(), 1);
+ QCOMPARE(mediaStatusSpy.count(), 6); // Loading -> Invalid -> Loading -> Buffered -> EndOfMedia -> NoMedia
+
+ player.setPlaylist(Q_NULLPTR);
+
+ mediaSpy.clear();
+ currentMediaSpy.clear();
+ stateSpy.clear();
+ mediaStatusSpy.clear();
+ errorSpy.clear();
+
+ // --- playlist with only invalid media
+ QMediaPlaylist invalidPlaylist2;
+ invalidPlaylist2.addMedia(QUrl("invalid"));
+ invalidPlaylist2.addMedia(QUrl("invalid2"));
+
+ player.setPlaylist(&invalidPlaylist2);
+
+ player.play();
+ QTRY_COMPARE_WITH_TIMEOUT(player.state(), QMediaPlayer::StoppedState, 10000);
+
+ QCOMPARE(mediaSpy.count(), 1);
+ QCOMPARE(currentMediaSpy.count(), 3); // invalid -> invalid2 -> NoMedia
+ QCOMPARE(stateSpy.count(), 2);
+ QCOMPARE(errorSpy.count(), 2);
+ QCOMPARE(mediaStatusSpy.count(), 5); // Loading -> Invalid -> Loading -> Invalid -> NoMedia
}
void tst_QMediaPlayerBackend::surfaceTest_data()
diff --git a/tests/auto/integration/qsoundeffect/BLACKLIST b/tests/auto/integration/qsoundeffect/BLACKLIST
index 0f872a576..467169fcf 100644
--- a/tests/auto/integration/qsoundeffect/BLACKLIST
+++ b/tests/auto/integration/qsoundeffect/BLACKLIST
@@ -4,3 +4,6 @@ linux
#QTBUG-55735
[testSetSourceWhilePlaying]
linux
+
+[testSetSourceWhileLoading]
+linux
diff --git a/tests/auto/integration/qsoundeffect/qsoundeffect.pro b/tests/auto/integration/qsoundeffect/qsoundeffect.pro
index c4d965121..8ec2e458a 100644
--- a/tests/auto/integration/qsoundeffect/qsoundeffect.pro
+++ b/tests/auto/integration/qsoundeffect/qsoundeffect.pro
@@ -8,7 +8,7 @@ CONFIG += testcase
SOURCES += tst_qsoundeffect.cpp
unix:!mac {
- !contains(QT_CONFIG, pulseaudio) {
+ !qtConfig(pulseaudio) {
DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER
}
}
diff --git a/tests/auto/unit/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp b/tests/auto/unit/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp
index fb689fbd3..f4759bbf7 100644
--- a/tests/auto/unit/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp
+++ b/tests/auto/unit/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp
@@ -28,7 +28,7 @@
//TESTED_COMPONENT=src/multimedia
-#include <qtmultimediadefs.h>
+#include <qtmultimediaglobal.h>
#include "qgraphicsvideoitem.h"
#include <QtTest/QtTest>
#include "qmediaobject.h"
diff --git a/tests/auto/unit/qmediaobject/tst_qmediaobject.cpp b/tests/auto/unit/qmediaobject/tst_qmediaobject.cpp
index 0548d1e1a..d2b43c56d 100644
--- a/tests/auto/unit/qmediaobject/tst_qmediaobject.cpp
+++ b/tests/auto/unit/qmediaobject/tst_qmediaobject.cpp
@@ -299,7 +299,7 @@ void tst_QMediaObject::notifySignals()
QTRY_COMPARE(spy.count(), count);
qint64 elapsed = timer.elapsed();
- int expectedElapsed = count * interval * 1.3; // give it some margin of error
+ int expectedElapsed = count * interval * 1.5; // give it some margin of error
QVERIFY2(elapsed < expectedElapsed, QString("elapsed: %1, expected: %2").arg(elapsed).arg(expectedElapsed).toLocal8Bit().constData());
}
diff --git a/tests/auto/unit/qpaintervideosurface/tst_qpaintervideosurface.cpp b/tests/auto/unit/qpaintervideosurface/tst_qpaintervideosurface.cpp
index ae1f7a5bc..4b2136a5c 100644
--- a/tests/auto/unit/qpaintervideosurface/tst_qpaintervideosurface.cpp
+++ b/tests/auto/unit/qpaintervideosurface/tst_qpaintervideosurface.cpp
@@ -34,7 +34,7 @@
#include <QtWidgets/qapplication.h>
#include <qvideosurfaceformat.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+#if QT_CONFIG(opengl)
#include <QtOpenGL/qgl.h>
#include <QtOpenGL/qglframebufferobject.h>
#include <QtGui/qopenglfunctions.h>
@@ -57,7 +57,7 @@ private slots:
void present();
void presentOpaqueFrame();
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+#if QT_CONFIG(opengl)
void shaderType();
@@ -78,7 +78,7 @@ private slots:
Q_DECLARE_METATYPE(const uchar *)
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+#if QT_CONFIG(opengl)
Q_DECLARE_METATYPE(QPainterVideoSurface::ShaderType);
class QtTestGLVideoBuffer : public QAbstractVideoBuffer
@@ -551,7 +551,7 @@ void tst_QPainterVideoSurface::presentOpaqueFrame()
QCOMPARE(surface.error(), QAbstractVideoSurface::IncorrectFormatError);
}
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+#if QT_CONFIG(opengl)
void tst_QPainterVideoSurface::shaderType()
{
diff --git a/tests/auto/unit/qvideowidget/tst_qvideowidget.cpp b/tests/auto/unit/qvideowidget/tst_qvideowidget.cpp
index a1d16e60b..3baa72281 100644
--- a/tests/auto/unit/qvideowidget/tst_qvideowidget.cpp
+++ b/tests/auto/unit/qvideowidget/tst_qvideowidget.cpp
@@ -28,7 +28,7 @@
//TESTED_COMPONENT=src/multimedia
-#include <qtmultimediadefs.h>
+#include <qtmultimediaglobal.h>
#include <QtTest/QtTest>
#include "qvideowidget.h"