]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/qt4.cpp
Qt4: Some cosmetic work and design by Leo Spalteholz
[vlc] / modules / gui / qt4 / qt4.cpp
index 5cb8a6eb20dc8688ceef6d6104e2f9b541084e52..0da277fb404ae1d44135071b2f2bb5b3bf2aa7da 100644 (file)
@@ -55,8 +55,8 @@ vlc_module_begin();
 
     add_submodule();
         set_description( "Dialogs provider" );
-        set_capability( "dialogs provider", 51 );
-        add_bool( "qt-always-video", VLC_FALSE, NULL, "", "", VLC_TRUE );
+        set_capability( "dialogs provider", 49 );
+        add_bool( "qt-always-video", VLC_FALSE, NULL, "FIXME", "FIXME", VLC_TRUE );
         set_callbacks( OpenDialogs, Close );
 vlc_module_end();
 
@@ -71,14 +71,7 @@ static int Open( vlc_object_t *p_this )
     p_intf->p_sys = (intf_sys_t *)malloc(sizeof( intf_sys_t ) );
     memset( p_intf->p_sys, 0, sizeof( intf_sys_t ) );
 
-    p_intf->p_sys->p_playlist = (playlist_t *)vlc_object_find( p_intf,
-                            VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
-    if( !p_intf->p_sys->p_playlist )
-    {
-        free( p_intf->p_sys );
-        return VLC_EGENERIC;
-    }
-
+    p_intf->p_sys->p_playlist = pl_Yield( p_intf );
     p_intf->p_sys->p_sub = msg_Subscribe( p_intf, MSG_QUEUE_NORMAL );
 
     return VLC_SUCCESS;
@@ -145,8 +138,8 @@ static void Init( intf_thread_t *p_intf )
 
     app->setQuitOnLastWindowClosed( false );
     app->exec();
- //   fprintf( stderr, "Qt execution terminated\n" );
     MainInputManager::killInstance();
+    DialogsProvider::killInstance();
     delete p_intf->p_sys->p_mi;
 }
 
@@ -157,8 +150,7 @@ static void ShowDialog( intf_thread_t *p_intf, int i_dialog_event, int i_arg,
                         intf_dialog_args_t *p_arg )
 {
     DialogEvent *event = new DialogEvent( i_dialog_event, i_arg, p_arg );
-    QApplication::postEvent( DialogsProvider::getInstance( p_intf ),
-                             static_cast<QEvent*>(event) );
+    QApplication::postEvent( THEDP, static_cast<QEvent*>(event) );
 }
 
 /*****************************************************************************