[vlc-commits] Qt: do not emit signals from the MIM constructor

Jean-Baptiste Kempf git at videolan.org
Tue Mar 17 18:04:00 CET 2015


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Mar 17 18:03:17 2015 +0100| [84cb607a32674ce5a316098185c2e042d1148904] | committer: Jean-Baptiste Kempf

Qt: do not emit signals from the MIM constructor

Should close #14162

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

 modules/gui/qt4/input_manager.cpp |    5 -----
 modules/gui/qt4/qt4.cpp           |    6 +++++-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 0976e93..749be0f 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -1035,11 +1035,6 @@ MainInputManager::MainInputManager( intf_thread_t *_p_intf )
     /* Warn our embedded IM about input changes */
     DCONNECT( this, inputChanged( input_thread_t * ),
               im, inputChangedHandler() );
-
-    /* initialize p_input (an input can already be running) */
-    p_input = playlist_CurrentInput( THEPL );
-    if( p_input )
-        emit inputChanged( p_input );
 }
 
 MainInputManager::~MainInputManager()
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 1122579..43d7ba9 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -499,7 +499,11 @@ static void *Thread( void *obj )
 
     /* Initialize the Dialog Provider and the Main Input Manager */
     DialogsProvider::getInstance( p_intf );
-    MainInputManager::getInstance( p_intf );
+    MainInputManager *mim = MainInputManager::getInstance( p_intf );
+    /* initialize p_input (an input can already be running) */
+    input_thread_t *p_input = playlist_CurrentInput( THEPL );
+    if( p_input )
+        mim->getIM()->inputChangedHandler();
 
 #ifdef UPDATE_CHECK
     /* Checking for VLC updates */



More information about the vlc-commits mailing list