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

Jean-Baptiste Kempf git at videolan.org
Thu Dec 10 16:17:40 CET 2015


vlc/vlc-2.2 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Mar 17 18:03:17 2015 +0100| [e6a19dffb201f37f4387953e30c51d1db89ff16b] | committer: Hugo Beauzée-Luyssen

Qt: do not emit signals from the MIM constructor

Should close #14162

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

 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 22b9698..bd99dec 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -1046,11 +1046,6 @@ MainInputManager::MainInputManager( intf_thread_t *_p_intf )
     DCONNECT( this, inputChanged(),
               im, inputChangedHandler() );
 
-    /* initialize p_input (an input can already be running) */
-    p_input = playlist_CurrentInput( THEPL );
-    if( p_input )
-        emit inputChanged( );
-
     /* Audio Menu */
     menusAudioMapper = new QSignalMapper();
     CONNECT( menusAudioMapper, mapped(QString), this, menusUpdateAudio( QString ) );
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index fa77a4a..966e784 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -507,7 +507,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