]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/qt4.cpp
Qt: allow loop/repeat button to be in a toolbar (part 1)
[vlc] / modules / gui / qt4 / qt4.cpp
index 5c298dfbd8682cac66846129b0a716fdb1451713..4cb7d1cceab3f1372938b6803d0335209f4b6350 100644 (file)
 #endif
 
 #include <QApplication>
-#include <QLocale>
-#include <QTranslator>
 #include <QDate>
-#include <QMutex>
-#include <QMutexLocker>
-#include <QWaitCondition>
 
 #include "qt4.hpp"
 
@@ -51,7 +46,7 @@
 #include "../../../share/vlc32x32-christmas.xpm"
 #include <vlc_plugin.h>
 
-#ifdef WIN32
+#ifdef WIN32 /* For static builds */
  #include <QtPlugin>
  Q_IMPORT_PLUGIN(qjpeg)
  Q_IMPORT_PLUGIN(qtaccessiblewidgets)
@@ -284,6 +279,7 @@ static int Open( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
     XCloseDisplay( p_display );
+    putenv( "XLIB_SKIP_ARGB_VISUALS=1" );
 #endif
 
     /* Allocations of p_sys */
@@ -334,7 +330,9 @@ static void Close( vlc_object_t *p_this )
     intf_thread_t *p_intf = (intf_thread_t *)p_this;
     intf_sys_t *p_sys = p_intf->p_sys;
 
-    var_Destroy (p_this->p_libvlc, "qt4-iface");
+    if( !p_sys->b_isDialogProvider )
+        var_Destroy (p_this->p_libvlc, "qt4-iface");
+
     QVLCApp::triggerQuit();
 
     vlc_join (p_sys->thread, NULL);
@@ -381,9 +379,9 @@ static void *Thread( void *obj )
 
     /* Icon setting */
     if( QDate::currentDate().dayOfYear() >= 352 ) /* One Week before Xmas */
-        app.setWindowIcon( QIcon( QPixmap(vlc_christmas_xpm) ) );
+        app.setWindowIcon( QIcon(vlc_christmas_xpm) );
     else
-        app.setWindowIcon( QIcon( QPixmap(vlc_xpm) ) );
+        app.setWindowIcon( QIcon(vlc_xpm) );
 
     /* Initialize timers and the Dialog Provider */
     DialogsProvider::getInstance( p_intf );
@@ -473,7 +471,6 @@ static void *Thread( void *obj )
     MainInputManager::killInstance();
 
 
-
     /* Delete the application automatically */
 #ifdef Q_WS_X11
     free( display );
@@ -560,3 +557,4 @@ static void WindowClose( vlc_object_t *p_obj )
     msg_Dbg( p_obj, "releasing video..." );
     p_mi->releaseVideo();
 }
+