Commit 62d3fd14 authored by Nate Graham's avatar Nate Graham
Browse files

Don't unnecessarily disable back and forward buttons when paused

You might still want to move backwards or forward when the player is
paused.

BUG: 442137
FIXED-IN: 21.08.2
parent 27b47899
Pipeline #81005 passed with stage
in 17 seconds
......@@ -107,11 +107,11 @@ void ManageMediaPlayerControlTest::testTracksCase()
QCOMPARE(previousTrackChangedSpy.count(), 1);
QCOMPARE(currentTrackChangedSpy.count(), 1);
QCOMPARE(nextTrackChangedSpy.count(), 0);
QCOMPARE(skipBackwardControlEnabledChangedSpy.count(), 0);
QCOMPARE(skipBackwardControlEnabledChangedSpy.count(), 1);
QCOMPARE(playControlEnabledChangedSpy.count(), 1);
QCOMPARE(skipForwardControlEnabledChangedSpy.count(), 0);
QVERIFY(myControl.playControlEnabled());
QVERIFY(!myControl.skipBackwardControlEnabled());
QVERIFY(myControl.skipBackwardControlEnabled());
QVERIFY(!myControl.skipForwardControlEnabled());
myControl.playerPlaying();
......@@ -132,12 +132,12 @@ void ManageMediaPlayerControlTest::testTracksCase()
QCOMPARE(previousTrackChangedSpy.count(), 1);
QCOMPARE(currentTrackChangedSpy.count(), 1);
QCOMPARE(nextTrackChangedSpy.count(), 1);
QCOMPARE(skipBackwardControlEnabledChangedSpy.count(), 2);
QCOMPARE(skipBackwardControlEnabledChangedSpy.count(), 1);
QCOMPARE(playControlEnabledChangedSpy.count(), 1);
QCOMPARE(skipForwardControlEnabledChangedSpy.count(), 0);
QCOMPARE(skipForwardControlEnabledChangedSpy.count(), 1);
QVERIFY(myControl.playControlEnabled());
QVERIFY(!myControl.skipBackwardControlEnabled());
QVERIFY(!myControl.skipForwardControlEnabled());
QVERIFY(myControl.skipBackwardControlEnabled());
QVERIFY(myControl.skipForwardControlEnabled());
myControl.playerPlaying();
......@@ -145,7 +145,7 @@ void ManageMediaPlayerControlTest::testTracksCase()
QCOMPARE(currentTrackChangedSpy.count(), 1);
QCOMPARE(nextTrackChangedSpy.count(), 1);
QCOMPARE(nextTrackChangedSpy.count(), 1);
QCOMPARE(skipBackwardControlEnabledChangedSpy.count(), 3);
QCOMPARE(skipBackwardControlEnabledChangedSpy.count(), 1);
QCOMPARE(playControlEnabledChangedSpy.count(), 1);
QCOMPARE(skipForwardControlEnabledChangedSpy.count(), 1);
QVERIFY(myControl.playControlEnabled());
......
......@@ -19,12 +19,12 @@ bool ManageMediaPlayerControl::playControlEnabled() const
bool ManageMediaPlayerControl::skipBackwardControlEnabled() const
{
return (mPreviousTrack.isValid() && mIsInPlayingState);
return (mPreviousTrack.isValid());
}
bool ManageMediaPlayerControl::skipForwardControlEnabled() const
{
return (mNextTrack.isValid() && mIsInPlayingState);
return (mNextTrack.isValid());
}
bool ManageMediaPlayerControl::musicPlaying() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment