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>
This commit is contained in:
committed by
Qt by Nokia
parent
502d3c8eb3
commit
55c0505a00
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user