QMediaPlayer::setPosition: do not check isSeekable and do not bound by duration

To allow setPosition to be called in stopped state we no longer check
if the player is in seekable state and allow position to be greater than
duration.
Unit test has been updated accordingly.

Change-Id: I29447ffe797a7cc3dcc80d20b2527e9eda493ab6
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
This commit is contained in:
Lev Zelenskiy
2012-02-06 13:11:10 +10:00
committed by Qt by Nokia
parent 0d9a5cc5b3
commit 51ca5582c2
2 changed files with 2 additions and 7 deletions

View File

@@ -379,11 +379,6 @@ void tst_QMediaPlayer::testPosition()
QCOMPARE(player->position(), qint64(0));
QCOMPARE(spy.count(), position == 0 ? 0 : 1); }
mockService->setPosition(position);
{ QSignalSpy spy(player, SIGNAL(positionChanged(qint64)));
player->setPosition(duration + 1);
QCOMPARE(player->position(), duration);
QCOMPARE(spy.count(), position == duration ? 0 : 1); }
}
else {
QSignalSpy spy(player, SIGNAL(positionChanged(qint64)));