diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-05-07 14:42:53 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-05-07 13:04:55 +0000 |
commit | 1b8094a5fd83a7d14bc2f9fb4cf9c33af3a58d92 (patch) | |
tree | f2bd7187062273179a60dbb680a02a81ee738be9 /tests/auto/integration/qaudiodecoderbackend/tst_qaudiodecoderbackend.cpp | |
parent | b8cf9cae1baafc6a6ca8ba853aac6025834c3a36 (diff) |
Some API and doc fixes for QAudioDecoder
Change-Id: I0f839896c9f813939b99b01242b54a00796731a8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/integration/qaudiodecoderbackend/tst_qaudiodecoderbackend.cpp')
-rw-r--r-- | tests/auto/integration/qaudiodecoderbackend/tst_qaudiodecoderbackend.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/auto/integration/qaudiodecoderbackend/tst_qaudiodecoderbackend.cpp b/tests/auto/integration/qaudiodecoderbackend/tst_qaudiodecoderbackend.cpp index 74d5653ac..a59bd1701 100644 --- a/tests/auto/integration/qaudiodecoderbackend/tst_qaudiodecoderbackend.cpp +++ b/tests/auto/integration/qaudiodecoderbackend/tst_qaudiodecoderbackend.cpp @@ -102,15 +102,15 @@ void tst_QAudioDecoderBackend::fileTest() QVERIFY(d.state() == QAudioDecoder::StoppedState); QVERIFY(d.bufferAvailable() == false); - QCOMPARE(d.sourceFilename(), QString("")); + QCOMPARE(d.source(), QString("")); QVERIFY(d.audioFormat() == QAudioFormat()); // Test local file QFileInfo fileInfo(QFINDTESTDATA(TEST_FILE_NAME)); - d.setSourceFilename(fileInfo.absoluteFilePath()); + d.setSource(fileInfo.absoluteFilePath()); QVERIFY(d.state() == QAudioDecoder::StoppedState); QVERIFY(!d.bufferAvailable()); - QCOMPARE(d.sourceFilename(), fileInfo.absoluteFilePath()); + QCOMPARE(d.source(), fileInfo.absoluteFilePath()); QSignalSpy readySpy(&d, SIGNAL(bufferReady())); QSignalSpy bufferChangedSpy(&d, SIGNAL(bufferAvailableChanged(bool))); @@ -279,15 +279,15 @@ void tst_QAudioDecoderBackend::unsupportedFileTest() QVERIFY(d.state() == QAudioDecoder::StoppedState); QVERIFY(d.bufferAvailable() == false); - QCOMPARE(d.sourceFilename(), QString("")); + QCOMPARE(d.source(), QString("")); QVERIFY(d.audioFormat() == QAudioFormat()); // Test local file QFileInfo fileInfo(QFINDTESTDATA(TEST_UNSUPPORTED_FILE_NAME)); - d.setSourceFilename(fileInfo.absoluteFilePath()); + d.setSource(fileInfo.absoluteFilePath()); QVERIFY(d.state() == QAudioDecoder::StoppedState); QVERIFY(!d.bufferAvailable()); - QCOMPARE(d.sourceFilename(), fileInfo.absoluteFilePath()); + QCOMPARE(d.source(), fileInfo.absoluteFilePath()); QSignalSpy readySpy(&d, SIGNAL(bufferReady())); QSignalSpy bufferChangedSpy(&d, SIGNAL(bufferAvailableChanged(bool))); @@ -357,15 +357,15 @@ void tst_QAudioDecoderBackend::corruptedFileTest() QVERIFY(d.state() == QAudioDecoder::StoppedState); QVERIFY(d.bufferAvailable() == false); - QCOMPARE(d.sourceFilename(), QString("")); + QCOMPARE(d.source(), QString("")); QVERIFY(d.audioFormat() == QAudioFormat()); // Test local file QFileInfo fileInfo(QFINDTESTDATA(TEST_CORRUPTED_FILE_NAME)); - d.setSourceFilename(fileInfo.absoluteFilePath()); + d.setSource(fileInfo.absoluteFilePath()); QVERIFY(d.state() == QAudioDecoder::StoppedState); QVERIFY(!d.bufferAvailable()); - QCOMPARE(d.sourceFilename(), fileInfo.absoluteFilePath()); + QCOMPARE(d.source(), fileInfo.absoluteFilePath()); QSignalSpy readySpy(&d, SIGNAL(bufferReady())); QSignalSpy bufferChangedSpy(&d, SIGNAL(bufferAvailableChanged(bool))); @@ -444,7 +444,7 @@ void tst_QAudioDecoderBackend::deviceTest() QVERIFY(d.state() == QAudioDecoder::StoppedState); QVERIFY(d.bufferAvailable() == false); - QCOMPARE(d.sourceFilename(), QString("")); + QCOMPARE(d.source(), QString("")); QVERIFY(d.audioFormat() == QAudioFormat()); QFileInfo fileInfo(QFINDTESTDATA(TEST_FILE_NAME)); @@ -453,7 +453,7 @@ void tst_QAudioDecoderBackend::deviceTest() d.setSourceDevice(&file); QVERIFY(d.sourceDevice() == &file); - QVERIFY(d.sourceFilename().isEmpty()); + QVERIFY(d.source().isEmpty()); // We haven't set the format yet QVERIFY(d.audioFormat() == QAudioFormat()); |