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:
committed by
Qt by Nokia
parent
0d9a5cc5b3
commit
51ca5582c2
@@ -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)));
|
||||
|
||||
Reference in New Issue
Block a user