summaryrefslogtreecommitdiffstats
path: root/tests/auto/integration/qsoundeffect
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-01-03 13:41:33 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-05 04:01:51 +0100
commit55c0505a001a8ebde961dc5e4f16806efd72bb4e (patch)
tree369e47f4b426f9c4d9c62267560564fb3cf837c4 /tests/auto/integration/qsoundeffect
parent502d3c8eb353f45f988e371aa6d7938d5ec9d51e (diff)
QSound/QSoundEffect: Use QFINDTESTDATA to locate test data.
Replace SRCDIR define by QFINDTESTDATA, which is the standard method of locating test data. Remove apparently unused code path within QT_QSOUNDEFFECT_USEAPPLICATIONPATH. Change-Id: Id7120e75af727839ad2d1d2b3ef25c7ef2122fa5 Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com> Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Diffstat (limited to 'tests/auto/integration/qsoundeffect')
-rw-r--r--tests/auto/integration/qsoundeffect/qsoundeffect.pro2
-rw-r--r--tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp10
2 files changed, 5 insertions, 7 deletions
diff --git a/tests/auto/integration/qsoundeffect/qsoundeffect.pro b/tests/auto/integration/qsoundeffect/qsoundeffect.pro
index 4d7f083b1..352273a9c 100644
--- a/tests/auto/integration/qsoundeffect/qsoundeffect.pro
+++ b/tests/auto/integration/qsoundeffect/qsoundeffect.pro
@@ -8,8 +8,6 @@ CONFIG += no_private_qt_headers_warning
SOURCES += tst_qsoundeffect.cpp
-DEFINES += SRCDIR=\\\"$$PWD/\\\"
-
unix:!mac {
!contains(QT_CONFIG, pulseaudio) {
DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER
diff --git a/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp b/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp
index f2c576a05..771110ce4 100644
--- a/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp
+++ b/tests/auto/integration/qsoundeffect/tst_qsoundeffect.cpp
@@ -75,11 +75,11 @@ private:
void tst_QSoundEffect::initTestCase()
{
-#ifdef QT_QSOUNDEFFECT_USEAPPLICATIONPATH
- url = QUrl::fromLocalFile(QCoreApplication::applicationDirPath() + QString("/test.wav"));
-#else
- url = QUrl::fromLocalFile(QString(SRCDIR "test.wav"));
-#endif
+ const QString testFileName = QStringLiteral("test.wav");
+ const QString fullPath = QFINDTESTDATA(testFileName);
+ QVERIFY2(!fullPath.isEmpty(), qPrintable(QStringLiteral("Unable to locate ") + testFileName));
+
+ url = QUrl::fromLocalFile(fullPath);
sound = new QSoundEffect(this);