[vlc-commits] qt: use showRemainingTime attribute from MainInterface in TimeLabel

Pierre Lamot git at videolan.org
Thu Aug 29 10:44:42 CEST 2019


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Wed Aug  7 14:43:42 2019 +0200| [1c16e351d9464a7cfb484f1f131d115f7e7d2b29] | committer: Jean-Baptiste Kempf

qt: use showRemainingTime attribute from MainInterface in TimeLabel

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1c16e351d9464a7cfb484f1f131d115f7e7d2b29
---

 modules/gui/qt/components/interface_widgets.cpp | 8 ++------
 modules/gui/qt/components/interface_widgets.hpp | 2 --
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/modules/gui/qt/components/interface_widgets.cpp b/modules/gui/qt/components/interface_widgets.cpp
index 35e90367f8..3105d5466e 100644
--- a/modules/gui/qt/components/interface_widgets.cpp
+++ b/modules/gui/qt/components/interface_widgets.cpp
@@ -947,10 +947,7 @@ TimeLabel::TimeLabel( intf_thread_t *_p_intf, TimeLabel::Display _displayType  )
     connect( THEMIM, &PlayerController::positionUpdated,
               this, QOverload<float , vlc_tick_t, int>::of(&TimeLabel::setDisplayPosition) );
 
-    connect( this, &TimeLabel::broadcastRemainingTime,
-         THEMIM, &PlayerController::remainingTimeChanged );
-
-    connect( THEMIM, &PlayerController::remainingTimeChanged,
+    connect( p_intf->p_sys->p_mi, &MainInterface::showRemainingTimeChanged,
               this, &TimeLabel::setRemainingTime );
 
     setStyleSheet( "QLabel { padding-left: 4px; padding-right: 4px; }" );
@@ -1046,6 +1043,5 @@ void TimeLabel::setDisplayPosition( float pos )
 void TimeLabel::toggleTimeDisplay()
 {
     b_remainingTime = !b_remainingTime;
-    getSettings()->setValue( "MainWindow/ShowRemainingTime", b_remainingTime );
-    emit broadcastRemainingTime( b_remainingTime );
+    p_intf->p_sys->p_mi->setShowRemainingTime(b_remainingTime);
 }
diff --git a/modules/gui/qt/components/interface_widgets.hpp b/modules/gui/qt/components/interface_widgets.hpp
index f4c25310cf..c6510c3b40 100644
--- a/modules/gui/qt/components/interface_widgets.hpp
+++ b/modules/gui/qt/components/interface_widgets.hpp
@@ -217,8 +217,6 @@ private slots:
     void setRemainingTime( bool );
     void setDisplayPosition( float pos, vlc_tick_t time, int length );
     void setDisplayPosition( float pos );
-signals:
-    void broadcastRemainingTime( bool );
 };
 
 class SpeedLabel : public QLabel



More information about the vlc-commits mailing list