summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-06-17 10:02:24 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-06-17 10:02:24 (GMT)
commit3a55f0eab402a72a0f98fdfe5505614fed5d19ed (patch)
tree987e5690afc1ca2b51e50dd10345be28294d3751
parentc4551c5df74bcd7e6166ce502832704b9495c685 (diff)
parenteda6ef48f7a1c5f93e09fd85fa54123569bb0a5f (diff)
downloadQt-3a55f0eab402a72a0f98fdfe5505614fed5d19ed.zip
Qt-3a55f0eab402a72a0f98fdfe5505614fed5d19ed.tar.gz
Qt-3a55f0eab402a72a0f98fdfe5505614fed5d19ed.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
-rw-r--r--src/3rdparty/phonon/phonon/volumeslider.cpp2
-rw-r--r--tests/auto/mediaobject/tst_mediaobject.cpp23
2 files changed, 24 insertions, 1 deletions
diff --git a/src/3rdparty/phonon/phonon/volumeslider.cpp b/src/3rdparty/phonon/phonon/volumeslider.cpp
index b59f689..1888cb6 100644
--- a/src/3rdparty/phonon/phonon/volumeslider.cpp
+++ b/src/3rdparty/phonon/phonon/volumeslider.cpp
@@ -85,7 +85,7 @@ VolumeSlider::~VolumeSlider()
bool VolumeSlider::isMuteVisible() const
{
- return k_ptr->muteButton.isVisible();
+ return !k_ptr->muteButton.isHidden();
}
void VolumeSlider::setMuteVisible(bool visible)
diff --git a/tests/auto/mediaobject/tst_mediaobject.cpp b/tests/auto/mediaobject/tst_mediaobject.cpp
index c1a69f7..f04a4d7 100644
--- a/tests/auto/mediaobject/tst_mediaobject.cpp
+++ b/tests/auto/mediaobject/tst_mediaobject.cpp
@@ -148,6 +148,7 @@ class tst_MediaObject : public QObject
void testPlayBeforeFinish();
void testPauseOnFinish();
void testReconnectBetweenTwoMediaObjects();
+ void volumeSliderMuteVisibility();
void cleanupTestCase();
private:
void _startPlayback(Phonon::State currentState = Phonon::StoppedState);
@@ -937,6 +938,28 @@ void tst_MediaObject::_testOneSeek(qint64 seekTo)
m_success = true;
}
+void tst_MediaObject::volumeSliderMuteVisibility()
+{
+ //this test doesn't really belong to mediaobject
+ // ### see if we should create a realy Phonon::VolumeSlider autotest
+ Phonon::VolumeSlider slider;
+ QVERIFY(slider.isMuteVisible()); // that is the default value
+ slider.setMuteVisible(true);
+ QVERIFY(slider.isMuteVisible());
+
+ //let's check that changing the visibility of the slider itself
+ //doesn't change what the slider reports
+ slider.setVisible(false);
+ QVERIFY(slider.isMuteVisible());
+ slider.setVisible(true);
+
+ slider.setMuteVisible(false);
+ QVERIFY(!slider.isMuteVisible());
+ slider.setMuteVisible(true);
+ QVERIFY(slider.isMuteVisible());
+}
+
+
#endif //QT_NO_PHONON