Make QDeclarativeAudio use QMediaPlayer instead of the controls.
Very minor changes in semantics due to previous differences: * negative positions are not supported any more (clamped to >= 0) * setting muted to the same value previously set to the control itself won't signal any more. Change-Id: Iacf4310508d853ae82b63dee28095fce12b6ff28 Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
7c0b1da0ed
commit
e9ebbeef72
@@ -617,18 +617,18 @@ void tst_QDeclarativeAudio::position()
|
||||
QCOMPARE(spy.count(), 1);
|
||||
|
||||
audio.setPosition(-5403);
|
||||
QCOMPARE(audio.position(), -5403);
|
||||
QCOMPARE(provider.playerControl()->position(), qint64(-5403));
|
||||
QCOMPARE(audio.position(), 0);
|
||||
QCOMPARE(provider.playerControl()->position(), qint64(0));
|
||||
QCOMPARE(spy.count(), 2);
|
||||
|
||||
audio.setPosition(-5403);
|
||||
QCOMPARE(audio.position(), -5403);
|
||||
QCOMPARE(provider.playerControl()->position(), qint64(-5403));
|
||||
QCOMPARE(audio.position(), 0);
|
||||
QCOMPARE(provider.playerControl()->position(), qint64(0));
|
||||
QCOMPARE(spy.count(), 2);
|
||||
|
||||
// Check the signal change signal is emitted if the change originates from the media service.
|
||||
provider.playerControl()->setPosition(0);
|
||||
QCOMPARE(audio.position(), 0);
|
||||
provider.playerControl()->setPosition(450);
|
||||
QCOMPARE(audio.position(), 450);
|
||||
QCOMPARE(spy.count(), 3);
|
||||
|
||||
connect(&audio, SIGNAL(positionChanged()), &QTestEventLoop::instance(), SLOT(exitLoop()));
|
||||
@@ -691,7 +691,7 @@ void tst_QDeclarativeAudio::muted()
|
||||
audio.setMuted(false);
|
||||
QCOMPARE(audio.isMuted(), false);
|
||||
QCOMPARE(provider.playerControl()->isMuted(), false);
|
||||
QCOMPARE(spy.count(), 3);
|
||||
QCOMPARE(spy.count(), 2);
|
||||
}
|
||||
|
||||
void tst_QDeclarativeAudio::bufferProgress()
|
||||
|
||||
Reference in New Issue
Block a user