<div dir="ltr"><div>Some platforms cough*mac*cough<br>do not like including <QtCore/qconfig.h><br>changed to #include <qconfig.h> to reflect this<br><br>From 7bbf5b7eba4455c8535b24af7aa516716c6a4c02 Mon Sep 17 00:00:00 2001</div><div>From: Martell Malone <<a href="mailto:martellmalone@gmail.com">martellmalone@gmail.com</a>></div><div>Date: Tue, 25 Nov 2014 10:41:09 +0000</div><div>Subject: [PATCH] gui-qt4: added QT_STATICPLUGIN define based on static or</div><div> shared as per the qt spec</div><div><br></div><div>---</div><div> modules/gui/qt4/Makefile.am | 2 +-</div><div> modules/gui/qt4/qt4.cpp     | 6 ++++--</div><div> modules/gui/qt4/qt4.hpp     | 6 ++++++</div><div> 3 files changed, 11 insertions(+), 3 deletions(-)</div><div><br></div><div>diff --git a/modules/gui/qt4/Makefile.am b/modules/gui/qt4/Makefile.am</div><div>index c608999..1a564cf 100644</div><div>--- a/modules/gui/qt4/Makefile.am</div><div>+++ b/modules/gui/qt4/Makefile.am</div><div>@@ -20,7 +20,7 @@ libqt4_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)'</div><div> if HAVE_OS2</div><div> else</div><div> if HAVE_WIN32</div><div>-libqt4_plugin_la_LIBADD += -lole32</div><div>+libqt4_plugin_la_LIBADD += -lole32 -lcomctl32 -luuid</div><div> else</div><div> libqt4_plugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIB) -lX11</div><div> endif</div><div>diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp</div><div>index 1e25371..b6aef43 100644</div><div>--- a/modules/gui/qt4/qt4.cpp</div><div>+++ b/modules/gui/qt4/qt4.cpp</div><div>@@ -52,8 +52,10 @@</div><div> #ifdef _WIN32 /* For static builds */</div><div>  #include <QtPlugin></div><div>  #if HAS_QT5</div><div>-  Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)</div><div>-  Q_IMPORT_PLUGIN(AccessibleFactory)</div><div>+  #ifdef QT_STATICPLUGIN</div><div>+   Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)</div><div>+   Q_IMPORT_PLUGIN(AccessibleFactory)</div><div>+  #endif</div><div>  #else</div><div>   Q_IMPORT_PLUGIN(qjpeg)</div><div>   Q_IMPORT_PLUGIN(qtaccessiblewidgets)</div><div>diff --git a/modules/gui/qt4/qt4.hpp b/modules/gui/qt4/qt4.hpp</div><div>index 6244763..258557c 100644</div><div>--- a/modules/gui/qt4/qt4.hpp</div><div>+++ b/modules/gui/qt4/qt4.hpp</div><div>@@ -33,6 +33,12 @@</div><div> #include <vlc_interface.h> /* intf_thread_t */</div><div> #include <vlc_playlist.h>  /* playlist_t */</div><div> </div><div>+#include <qconfig.h></div><div>+</div><div>+#ifdef QT_STATIC</div><div>+#define QT_STATICPLUGIN</div><div>+#endif</div><div>+</div><div> #define QT_NO_CAST_TO_ASCII</div><div> #include <QString></div><div> </div><div>-- </div><div>2.1.3</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 25, 2014 at 12:08 PM, Martell Malone <span dir="ltr"><<a href="mailto:martellmalone@gmail.com" target="_blank">martellmalone@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">My full name keeps getting stripped and the last line of the patch.<br>I will have to fix this git bug<span class=""><br><br><div>From 7bbf5b7eba4455c8535b24af7aa516716c6a4c02 Mon Sep 17 00:00:00 2001</div></span><div>From: Martell Malone <<a href="mailto:martellmalone@gmail.com" target="_blank">martellmalone@gmail.com</a>></div><div><div class="h5"><div>Date: Tue, 25 Nov 2014 10:41:09 +0000</div><div>Subject: [PATCH] gui-qt4: added QT_STATICPLUGIN define based on static or</div><div> shared as per the qt spec</div><div><br></div><div>---</div><div> modules/gui/qt4/Makefile.am | 2 +-</div><div> modules/gui/qt4/qt4.cpp     | 6 ++++--</div><div> modules/gui/qt4/qt4.hpp     | 6 ++++++</div><div> 3 files changed, 11 insertions(+), 3 deletions(-)</div><div><br></div><div>diff --git a/modules/gui/qt4/Makefile.am b/modules/gui/qt4/Makefile.am</div><div>index c608999..1a564cf 100644</div><div>--- a/modules/gui/qt4/Makefile.am</div><div>+++ b/modules/gui/qt4/Makefile.am</div><div>@@ -20,7 +20,7 @@ libqt4_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)'</div><div> if HAVE_OS2</div><div> else</div><div> if HAVE_WIN32</div><div>-libqt4_plugin_la_LIBADD += -lole32</div><div>+libqt4_plugin_la_LIBADD += -lole32 -lcomctl32 -luuid</div><div> else</div><div> libqt4_plugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIB) -lX11</div><div> endif</div><div>diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp</div><div>index 1e25371..b6aef43 100644</div><div>--- a/modules/gui/qt4/qt4.cpp</div><div>+++ b/modules/gui/qt4/qt4.cpp</div><div>@@ -52,8 +52,10 @@</div><div> #ifdef _WIN32 /* For static builds */</div><div>  #include <QtPlugin></div><div>  #if HAS_QT5</div><div>-  Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)</div><div>-  Q_IMPORT_PLUGIN(AccessibleFactory)</div><div>+  #ifdef QT_STATICPLUGIN</div><div>+   Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)</div><div>+   Q_IMPORT_PLUGIN(AccessibleFactory)</div><div>+  #endif</div><div>  #else</div><div>   Q_IMPORT_PLUGIN(qjpeg)</div><div>   Q_IMPORT_PLUGIN(qtaccessiblewidgets)</div><div>diff --git a/modules/gui/qt4/qt4.hpp b/modules/gui/qt4/qt4.hpp</div><div>index 6244763..258557c 100644</div><div>--- a/modules/gui/qt4/qt4.hpp</div><div>+++ b/modules/gui/qt4/qt4.hpp</div><div>@@ -33,6 +33,12 @@</div><div> #include <vlc_interface.h> /* intf_thread_t */</div><div> #include <vlc_playlist.h>  /* playlist_t */</div><div> </div><div>+#include <qtconfig.h></div><div>+</div><div>+#ifdef QT_STATIC</div><div>+#define QT_STATICPLUGIN</div><div>+#endif</div><div>+</div><div> #define QT_NO_CAST_TO_ASCII</div><div> #include <QString></div><div> </div></div></div><span class="HOEnZb"><font color="#888888"><div>-- </div><div>2.1.3</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 25, 2014 at 10:49 AM, Martell Malone <span dir="ltr"><<a href="mailto:martellmalone@gmail.com" target="_blank">martellmalone@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The QT spec says we should use QT_STATICPLUGIN defined if building a static plugin. <br><br>As we are using out own makefile and not a qt .pro project we have to define it ourselves.<br><br>This is then used to decide if we should import the modules QWindowsIntegrationPlugin and AccessibleFactory as these are not needed on a shared build.<br><br>Also added some extra missing libs for linking on mingw-w64 we need -lcomctl32 -luuid<br><br>comments and changes welcome :)<br><br><div>From 7bbf5b7eba4455c8535b24af7aa516716c6a4c02 Mon Sep 17 00:00:00 2001</div><div>From: martell <<a href="mailto:martellmalone@gmail.com" target="_blank">martellmalone@gmail.com</a>></div><div>Date: Tue, 25 Nov 2014 10:41:09 +0000</div><div>Subject: [PATCH] gui-qt4: added QT_STATICPLUGIN define based on static or</div><div> shared as per the qt spec</div><div><br></div><div>---</div><div> modules/gui/qt4/Makefile.am | 2 +-</div><div> modules/gui/qt4/qt4.cpp     | 6 ++++--</div><div> modules/gui/qt4/qt4.hpp     | 6 ++++++</div><div> 3 files changed, 11 insertions(+), 3 deletions(-)</div><div><br></div><div>diff --git a/modules/gui/qt4/Makefile.am b/modules/gui/qt4/Makefile.am</div><div>index c608999..1a564cf 100644</div><div>--- a/modules/gui/qt4/Makefile.am</div><div>+++ b/modules/gui/qt4/Makefile.am</div><div>@@ -20,7 +20,7 @@ libqt4_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)'</div><div> if HAVE_OS2</div><div> else</div><div> if HAVE_WIN32</div><div>-libqt4_plugin_la_LIBADD += -lole32</div><div>+libqt4_plugin_la_LIBADD += -lole32 -lcomctl32 -luuid</div><div> else</div><div> libqt4_plugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIB) -lX11</div><div> endif</div><div>diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp</div><div>index 1e25371..b6aef43 100644</div><div>--- a/modules/gui/qt4/qt4.cpp</div><div>+++ b/modules/gui/qt4/qt4.cpp</div><div>@@ -52,8 +52,10 @@</div><div> #ifdef _WIN32 /* For static builds */</div><div>  #include <QtPlugin></div><div>  #if HAS_QT5</div><div>-  Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)</div><div>-  Q_IMPORT_PLUGIN(AccessibleFactory)</div><div>+  #ifdef QT_STATICPLUGIN</div><div>+   Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)</div><div>+   Q_IMPORT_PLUGIN(AccessibleFactory)</div><div>+  #endif</div><div>  #else</div><div>   Q_IMPORT_PLUGIN(qjpeg)</div><div>   Q_IMPORT_PLUGIN(qtaccessiblewidgets)</div><div>diff --git a/modules/gui/qt4/qt4.hpp b/modules/gui/qt4/qt4.hpp</div><div>index 6244763..258557c 100644</div><div>--- a/modules/gui/qt4/qt4.hpp</div><div>+++ b/modules/gui/qt4/qt4.hpp</div><div>@@ -33,6 +33,12 @@</div><div> #include <vlc_interface.h> /* intf_thread_t */</div><div> #include <vlc_playlist.h>  /* playlist_t */</div><div> </div><div>+#include <qtconfig.h></div><div>+</div><div>+#ifdef QT_STATIC</div><div>+#define QT_STATICPLUGIN</div><div>+#endif</div><div>+</div><div> #define QT_NO_CAST_TO_ASCII</div><div> #include <QString> <br><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>