[vlc-devel] [PATCH 04/21] qt: use showRemainingTime attribute from MainInterface in TimeLabel
Pierre Lamot
pierre at videolabs.io
Wed Aug 7 15:52:10 CEST 2019
---
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
--
2.17.1
More information about the vlc-devel
mailing list