X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/ed0df8dc1fc9576e36c920882e7f4b00a2811113..2f0ceedae088158b8af24a5e94500a7d1c0edecb:/src/panels/information/phononwidget.cpp diff --git a/src/panels/information/phononwidget.cpp b/src/panels/information/phononwidget.cpp index 7f2ca9564..5f0c11158 100644 --- a/src/panels/information/phononwidget.cpp +++ b/src/panels/information/phononwidget.cpp @@ -25,15 +25,15 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include -#include -#include -#include -#include +#include +#include +#include +#include class EmbeddedVideoPlayer : public Phonon::VideoPlayer { @@ -118,7 +118,7 @@ void PhononWidget::showEvent(QShowEvent *event) return; } - if (m_topLayout == 0) { + if (!m_topLayout) { m_topLayout = new QVBoxLayout(this); m_topLayout->setMargin(0); m_topLayout->setSpacing(KDialog::spacingHint()); @@ -151,7 +151,7 @@ void PhononWidget::showEvent(QShowEvent *event) // Creating an audio player or video player instance might take up to // 2 seconds when doing it the first time. To prevent that the user - // interface gets noticable blocked, the creation is delayed until + // interface gets noticeable blocked, the creation is delayed until // the play button has been pressed (see PhononWidget::play()). } } @@ -185,16 +185,17 @@ void PhononWidget::play() { switch (m_mode) { case Audio: - if (m_audioMedia == 0) { + if (!m_audioMedia) { m_audioMedia = Phonon::createPlayer(Phonon::MusicCategory, m_url); m_audioMedia->setParent(this); } m_media = m_audioMedia; m_media->setCurrentSource(m_url); + m_media->play(); break; case Video: - if (m_videoPlayer == 0) { + if (!m_videoPlayer) { m_videoPlayer = new EmbeddedVideoPlayer(Phonon::VideoCategory, this); m_topLayout->insertWidget(0, m_videoPlayer); } @@ -208,8 +209,8 @@ void PhononWidget::play() break; } - Q_ASSERT(m_media != 0); - connect(m_media, SIGNAL(stateChanged(Phonon::State, Phonon::State)), + Q_ASSERT(m_media); + connect(m_media, SIGNAL(stateChanged(Phonon::State,Phonon::State)), this, SLOT(stateChanged(Phonon::State))); m_seekSlider->setMediaObject(m_media); @@ -218,9 +219,9 @@ void PhononWidget::play() void PhononWidget::stop() { - if (m_media != 0) { + if (m_media) { m_media->stop(); - disconnect(m_media, SIGNAL(stateChanged(Phonon::State, Phonon::State)), + disconnect(m_media, SIGNAL(stateChanged(Phonon::State,Phonon::State)), this, SLOT(stateChanged(Phonon::State))); emit playingStopped(); @@ -228,14 +229,14 @@ void PhononWidget::stop() m_playButton->show(); } - if (m_videoPlayer != 0) { + if (m_videoPlayer) { m_videoPlayer->hide(); } } void PhononWidget::applyVideoSize() { - if ((m_videoPlayer != 0) && m_videoSize.isValid()) { + if ((m_videoPlayer) && m_videoSize.isValid()) { m_videoPlayer->setSizeHint(m_videoSize); } }