{
Q_D(QMediaPlaylistNavigator);
- if (position<-1 || position>=d->playlist->mediaCount()) {
- qWarning() << "QMediaPlaylistNavigator: Jump outside playlist range";
+ if (position < -1 || position >= d->playlist->mediaCount())
position = -1;
- }
if (position != -1)
d->lastValidPos = position;
QCOMPARE(playlist.previousIndex(), 0);
QCOMPARE(playlist.previousIndex(2), -1);
- QTest::ignoreMessage(QtWarningMsg, "QMediaPlaylistNavigator: Jump outside playlist range ");
playlist.setCurrentIndex(2);
QCOMPARE(playlist.currentIndex(), -1);
QMediaPlaylistNavigator navigator(&playlist);
navigator.setPlaybackMode(QMediaPlaylist::Sequential);
- QTest::ignoreMessage(QtWarningMsg, "QMediaPlaylistNavigator: Jump outside playlist range ");
- navigator.jump(0);//it's ok to have warning here
+ navigator.jump(0);
QVERIFY(navigator.currentItem().isNull());
QCOMPARE(navigator.currentIndex(), -1);
QMediaPlaylistNavigator navigator(&playlist);
navigator.setPlaybackMode(QMediaPlaylist::Loop);
- QTest::ignoreMessage(QtWarningMsg, "QMediaPlaylistNavigator: Jump outside playlist range ");
navigator.jump(0);
QVERIFY(navigator.currentItem().isNull());
QCOMPARE(navigator.currentIndex(), -1);