[vlc-devel] commit: Qt: fix a misconception and a leak. (Jean-Baptiste Kempf )
git version control
git at videolan.org
Wed Dec 31 13:44:16 CET 2008
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Dec 30 21:12:43 2008 +0100| [72852e3b9fcc8a5222797014072157e46ceea2cd] | committer: Jean-Baptiste Kempf
Qt: fix a misconception and a leak.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=72852e3b9fcc8a5222797014072157e46ceea2cd
---
modules/gui/qt4/components/interface_widgets.cpp | 15 +++++++--------
modules/gui/qt4/components/interface_widgets.hpp | 2 +-
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 036a429..5e424fb 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -289,7 +289,7 @@ SpeedLabel::SpeedLabel( intf_thread_t *_p_intf, const QString text )
setContextMenuPolicy ( Qt::CustomContextMenu );
/* Create the Speed Control Widget */
- speedControl = new SpeedControlWidget( p_intf );
+ speedControl = new SpeedControlWidget( p_intf, this );
speedControlMenu = new QMenu( this );
QWidgetAction *widgetAction = new QWidgetAction( speedControl );
@@ -304,8 +304,7 @@ SpeedLabel::SpeedLabel( intf_thread_t *_p_intf, const QString text )
/* Change the SpeedRate in the Status Bar */
CONNECT( THEMIM->getIM(), rateChanged( int ), this, setRate( int ) );
- // FIXME this is wrong but will work for some time.
- CONNECT( THEMIM->getIM(), statusChanged( int ),
+ CONNECT( THEMIM, inputChanged( input_thread_t * ),
speedControl, activateOnState() );
}
@@ -331,8 +330,8 @@ void SpeedLabel::setRate( int rate )
/**********************************************************************
* Speed control widget
**********************************************************************/
-SpeedControlWidget::SpeedControlWidget( intf_thread_t *_p_i ) :
- QFrame( NULL ), p_intf( _p_i )
+SpeedControlWidget::SpeedControlWidget( intf_thread_t *_p_i, QWidget *_parent )
+ : QFrame( _parent ), p_intf( _p_i )
{
QSizePolicy sizePolicy( QSizePolicy::Maximum, QSizePolicy::Fixed );
sizePolicy.setHorizontalStretch( 0 );
@@ -523,8 +522,8 @@ TimeLabel::TimeLabel( intf_thread_t *_p_intf ) :QLabel(), p_intf( _p_intf )
setToolTip( qtr( "Toggle between elapsed and remaining time" ) );
- CONNECT( THEMIM->getIM(), statusChanged( int ),
- this, setStatus( int ) );
+/* CONNECT( THEMIM->getIM(), statusChanged( int ),
+ this, setStatus( int ) ); Remove */
CONNECT( THEMIM->getIM(), positionUpdated( float, int, int ),
this, setDisplayPosition( float, int, int ) );
}
@@ -549,7 +548,7 @@ void TimeLabel::toggleTimeDisplay()
{
b_remainingTime = !b_remainingTime;
}
-
+/* This is wrong remove */
void TimeLabel::setStatus( int i_status )
{
msg_Warn( p_intf, "Status: %i", i_status );
diff --git a/modules/gui/qt4/components/interface_widgets.hpp b/modules/gui/qt4/components/interface_widgets.hpp
index 8fa6f8e..619c7c5 100644
--- a/modules/gui/qt4/components/interface_widgets.hpp
+++ b/modules/gui/qt4/components/interface_widgets.hpp
@@ -175,7 +175,7 @@ class SpeedControlWidget : public QFrame
{
Q_OBJECT
public:
- SpeedControlWidget( intf_thread_t *);
+ SpeedControlWidget( intf_thread_t *, QWidget * );
void updateControls( int );
private:
intf_thread_t *p_intf;
More information about the vlc-devel
mailing list