]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/information/phononwidget.cpp
[InformationPanel] Hide the video when the preview is disabled, avoid computing the...
[dolphin.git] / src / panels / information / phononwidget.cpp
index 3a3268cb3da3726332e66f5ff644019da466139d..95f535713c32b0f8d24b157ea1374f0b1d67ae53 100644 (file)
 
 #include "phononwidget.h"
 
+#include <KIconLoader>
+#include <KLocalizedString>
 #include <Phonon/AudioOutput>
-#include <Phonon/Global>
 #include <Phonon/MediaObject>
 #include <Phonon/SeekSlider>
 #include <Phonon/VideoWidget>
 
-#include <QVBoxLayout>
-#include <QHBoxLayout>
 #include <QShowEvent>
 #include <QToolButton>
-#include <QDialog>
-#include <QIcon>
-#include <KIconLoader>
-#include <QUrl>
-#include <KLocalizedString>
+#include <QVBoxLayout>
 
 class EmbeddedVideoPlayer : public Phonon::VideoWidget
 {
@@ -52,7 +47,7 @@ class EmbeddedVideoPlayer : public Phonon::VideoWidget
             updateGeometry();
         }
 
-        QSize sizeHint() const Q_DECL_OVERRIDE
+        QSize sizeHint() const override
         {
             return m_sizeHint.isValid() ? m_sizeHint : Phonon::VideoWidget::sizeHint();
         }
@@ -109,10 +104,10 @@ void PhononWidget::showEvent(QShowEvent *event)
 
     if (!m_topLayout) {
         m_topLayout = new QVBoxLayout(this);
-        m_topLayout->setMargin(0);
+        m_topLayout->setContentsMargins(0, 0, 0, 0);
 
         QHBoxLayout *controlsLayout = new QHBoxLayout(this);
-        controlsLayout->setMargin(0);
+        controlsLayout->setContentsMargins(0, 0, 0, 0);
         controlsLayout->setSpacing(0);
 
         m_playButton = new QToolButton(this);
@@ -172,7 +167,7 @@ void PhononWidget::stateChanged(Phonon::State newstate)
             m_videoPlayer->hide();
         }
         emit hasVideoChanged(false);
-        // fall through
+        Q_FALLTHROUGH();
     default:
         m_stopButton->hide();
         m_playButton->show();