Merge remote-tracking branch 'origin/5.5' into 5.6

Change-Id: I01940fe4f3d059fbb425492a1748e2b5d9b6804b
This commit is contained in:
Liang Qi
2016-01-19 09:50:11 +01:00
6 changed files with 8 additions and 10 deletions

View File

@@ -702,11 +702,11 @@ void tst_QAudioOutput::push()
QVERIFY2((audioOutput.state() == QAudio::ActiveState), "didn't transition to ActiveState after receiving data");
QVERIFY2((audioOutput.error() == QAudio::NoError), "error state is not equal to QAudio::NoError after receiving data");
firstBuffer = false;
stateSignal.clear();
}
} else
QTest::qWait(20);
}
stateSignal.clear();
// Wait until playback finishes
QTest::qWait(3000); // 3 seconds should be plenty

View File

@@ -134,7 +134,6 @@ Item {
verify(sound1.muted == false)
verify(sound1.playing == false)
verify(sound1.status == 1) // Status.Loading
verify(sound1.category == "")
}
function test_muting() {

View File

@@ -150,8 +150,7 @@ void tst_QSoundEffect::testLooping()
QCOMPARE(readSignal_Remaining.count(), 0);
sound->play();
QCOMPARE(sound->loopsRemaining(), 5);
QCOMPARE(readSignal_Remaining.count(), 1);
QVERIFY(readSignal_Remaining.count() > 0);
// test.wav is about 200ms, wait until it has finished playing 5 times
QTestEventLoop::instance().enterLoop(3);
@@ -172,11 +171,10 @@ void tst_QSoundEffect::testLooping()
QCOMPARE(readSignal_Remaining.count(), 0);
sound->play();
QCOMPARE(sound->loopsRemaining(), 30);
QCOMPARE(readSignal_Remaining.count(), 1);
QVERIFY(readSignal_Remaining.count() > 0);
// wait for the sound to be played several times
QTRY_COMPARE(sound->loopsRemaining(), 20);
QTRY_VERIFY(sound->loopsRemaining() <= 20);
QVERIFY(readSignal_Remaining.count() >= 10);
readSignal_Count.clear();
readSignal_Remaining.clear();