[vlc-commits] doc: QtGL: use defines for static Qt / plugins
Alexandre Janniaux
git at videolan.org
Thu Nov 12 15:47:53 CET 2020
vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Mon Nov 9 14:37:27 2020 +0100| [a8aab2da0e505c2e954b39b864e76e0f3fd0e07e] | committer: Alexandre Janniaux
doc: QtGL: use defines for static Qt / plugins
Only import static plugin if QT_STATIC is defined, like the VLC Qt GUI
code, so that it links correctly on Linux with dynamic Qt.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a8aab2da0e505c2e954b39b864e76e0f3fd0e07e
---
doc/libvlc/QtGL/main.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/doc/libvlc/QtGL/main.cpp b/doc/libvlc/QtGL/main.cpp
index 1e86fe8245..564c83dd27 100644
--- a/doc/libvlc/QtGL/main.cpp
+++ b/doc/libvlc/QtGL/main.cpp
@@ -3,8 +3,12 @@
#include <QSurfaceFormat>
#include <QMainWindow>
-#include <QtPlugin>
+#ifdef QT_STATIC
+# include <QtPlugin>
+#ifdef QT_STATICPLUGIN
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
+#endif
+#endif
#include "qtvlcwidget.h"
More information about the vlc-commits
mailing list