[vlc-commits] Qt: early instantiation for THEMIM

Erwan Tulou git at videolan.org
Wed Jun 11 14:55:44 CEST 2014


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Wed Jun 11 13:16:36 2014 +0200| [0e89cd612a2bf0d04f08fffd9ee748e6cc3df842] | committer: Erwan Tulou

Qt: early instantiation for THEMIM

Rather than wait for the first call to THEMIM to instantiate this singleton,
do it explicitly at an early stage of the plugin initialization.

This is useful for Qt as a dialog provider, since otherwise THEMIM doesn't
get a chance to be set up until, e.g. the first call to a popupmenu,
which then makes this menu slightly longer and noticeable to display.

Also, remove the unneeded instantiation in the main_interface. (THEMIM has
already been used a few lines earlier, which makes the call useless).

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

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

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 7009e0f..43e5dcc 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -169,11 +169,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     createStatusBar();
     setStatusBarVisibility( getSettings()->value( "MainWindow/status-bar-visible", false ).toBool() );
 
-    /********************
-     * Input Manager    *
-     ********************/
-    MainInputManager::getInstance( p_intf );
-
 #ifdef _WIN32
     himl = NULL;
     p_taskbl = NULL;
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 0cadace..a156366 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -486,8 +486,9 @@ static void *Thread( void *obj )
         app.setWindowIcon( QIcon::fromTheme( "vlc", QIcon( ":/logo/vlc256.png" ) ) );
 #endif
 
-    /* Initialize timers and the Dialog Provider */
+    /* Initialize the Dialog Provider and the Main Input Manager */
     DialogsProvider::getInstance( p_intf );
+    MainInputManager::getInstance( p_intf );
 
 #ifdef UPDATE_CHECK
     /* Checking for VLC updates */



More information about the vlc-commits mailing list