]> git.sesse.net Git - vlc/commitdiff
Qt: add QT_STATICPLUGIN define as per the qt spec
authorMartell Malone <martellmalone@gmail.com>
Tue, 25 Nov 2014 13:23:38 +0000 (13:23 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 25 Nov 2014 16:13:52 +0000 (17:13 +0100)
The QT spec says we should use QT_STATICPLUGIN defined if building a
static plugin.

As we are using out own makefile and not a qt .pro project we have to
define it ourselves.

This is then used to decide if we should import the modules
QWindowsIntegrationPlugin and AccessibleFactory as these are not needed
on a shared build.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.hpp

index 1e25371b0661da4e74d25c609ed437b5e3a90409..b6aef43ceb33ef9d34ea7634a0687a9b051b7998 100644 (file)
 #ifdef _WIN32 /* For static builds */
  #include <QtPlugin>
  #if HAS_QT5
-  Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
-  Q_IMPORT_PLUGIN(AccessibleFactory)
+  #ifdef QT_STATICPLUGIN
+   Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
+   Q_IMPORT_PLUGIN(AccessibleFactory)
+  #endif
  #else
   Q_IMPORT_PLUGIN(qjpeg)
   Q_IMPORT_PLUGIN(qtaccessiblewidgets)
index 624476381c16182147377bcd56eb2671a72d380a..1db035af1e633433a55c567d542e2ac68c4cbdb8 100644 (file)
 #include <vlc_interface.h> /* intf_thread_t */
 #include <vlc_playlist.h>  /* playlist_t */
 
+#include <qconfig.h>
+
+#ifdef QT_STATIC
+#define QT_STATICPLUGIN
+#endif
+
 #define QT_NO_CAST_TO_ASCII
 #include <QString>