Browse Source

Qt: add QT_STATICPLUGIN define as per the qt spec

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>
pull/24/head
Martell Malone 12 years ago
committed by Jean-Baptiste Kempf
parent
commit
98ada62676
  1. 6
      modules/gui/qt4/qt4.cpp
  2. 6
      modules/gui/qt4/qt4.hpp

6
modules/gui/qt4/qt4.cpp

@ -52,8 +52,10 @@
#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)

6
modules/gui/qt4/qt4.hpp

@ -33,6 +33,12 @@
#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>

Loading…
Cancel
Save