Commit a9c9d3cf authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

qt4: input_manager: Pass a boolean to indicate if there is an input loaded

Do not pass an input_thread_t through the Qt message loop
parent f8b0c7d5
......@@ -514,7 +514,7 @@ SpeedLabel::SpeedLabel( intf_thread_t *_p_intf, QWidget *parent )
/* Change the SpeedRate in the Label */
CONNECT( THEMIM->getIM(), rateChanged( float ), this, setRate( float ) );
DCONNECT( THEMIM, inputChanged( input_thread_t * ),
DCONNECT( THEMIM, inputChanged( bool ),
speedControl, activateOnState() );
setContentsMargins(4, 0, 4, 0);
......
......@@ -59,7 +59,7 @@ PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */
rebuild( p_root );
DCONNECT( THEMIM->getIM(), metaChanged( input_item_t *),
this, processInputItemUpdate( input_item_t *) );
DCONNECT( THEMIM, inputChanged( input_thread_t * ),
DCONNECT( THEMIM, inputChanged( bool ),
this, processInputItemUpdate( ) );
CONNECT( THEMIM, playlistItemAppended( int, int ),
this, processItemAppend( int, int ) );
......
......@@ -49,7 +49,7 @@ ExtensionsManager::ExtensionsManager( intf_thread_t *_p_intf, QObject *parent )
menuMapper = new QSignalMapper( this );
CONNECT( menuMapper, mapped( int ), this, triggerMenu( int ) );
CONNECT( THEMIM->getIM(), playingStatusChanged( int ), this, playingChanged( int ) );
DCONNECT( THEMIM, inputChanged( input_thread_t * ),
DCONNECT( THEMIM, inputChanged( bool ),
this, inputChanged( ) );
CONNECT( THEMIM->getIM(), metaChanged( input_item_t* ),
this, metaChanged( input_item_t* ) );
......
......@@ -1035,7 +1035,7 @@ MainInputManager::MainInputManager( intf_thread_t *_p_intf )
mute.addCallback( this, SLOT(notifyMute(bool)) );
/* Warn our embedded IM about input changes */
DCONNECT( this, inputChanged( input_thread_t * ),
DCONNECT( this, inputChanged( bool ),
im, inputChangedHandler() );
}
......@@ -1045,7 +1045,7 @@ MainInputManager::~MainInputManager()
{
vlc_object_release( p_input );
p_input = NULL;
emit inputChanged( NULL );
emit inputChanged( false );
}
var_DelCallback( THEPL, "input-current", PLItemChanged, this );
......@@ -1100,7 +1100,7 @@ void MainInputManager::customEvent( QEvent *event )
if( p_input != NULL )
vlc_object_release( p_input );
p_input = playlist_CurrentInput( THEPL );
emit inputChanged( p_input );
emit inputChanged( p_input != NULL );
}
/* Playlist Control functions */
......
......@@ -309,7 +309,7 @@ private slots:
void menusUpdateAudio( const QString& );
signals:
void inputChanged( input_thread_t * );
void inputChanged( bool );
void volumeChanged( float );
void soundMuteChanged( bool );
void playlistItemAppended( int itemId, int parentId );
......
......@@ -153,7 +153,7 @@ SeekSlider::SeekSlider( Qt::Orientation q, QWidget *_parent, bool _static )
hideHandleTimer->setSingleShot( true );
hideHandleTimer->setInterval( FADEOUTDELAY );
CONNECT( MainInputManager::getInstance(), inputChanged( input_thread_t * ), this , inputUpdated( input_thread_t * ) );
CONNECT( MainInputManager::getInstance(), inputChanged( bool ), this , inputUpdated( bool ) );
CONNECT( this, sliderMoved( int ), this, startSeekTimer() );
CONNECT( seekLimitTimer, timeout(), this, updatePos() );
CONNECT( hideHandleTimer, timeout(), this, hideHandle() );
......@@ -229,9 +229,9 @@ void SeekSlider::updateBuffering( float f_buffering_ )
repaint();
}
void SeekSlider::inputUpdated( input_thread_t *p_input )
void SeekSlider::inputUpdated( bool b_has_input )
{
if ( p_input == NULL ) {
if ( b_has_input == false ) {
animLoading->stop();
mLoading = 0.0;
repaint();
......
......@@ -120,7 +120,7 @@ public slots:
private slots:
void startSeekTimer();
void updatePos();
void inputUpdated( input_thread_t *p_input );
void inputUpdated( bool );
signals:
void sliderDragged( float );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment