summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/gl_integrations
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-12-19 10:34:32 +0100
committerUlf Hermann <ulf.hermann@qt.io>2017-03-06 11:27:20 +0000
commitd6330a19b29ebff359a6746250c78437dbcaf77d (patch)
tree3ab0e390f0bfd30bb235ed5a0128bfd33e9cd4b7 /src/plugins/platforms/xcb/gl_integrations
parentf31dbeb4c7cd0d7559a8d7f523a3feea7d376186 (diff)
Use QT_CONFIG(library) instead of QT_NO_LIBRARY
For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/gl_integrations')
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.cpp6
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp4
2 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.cpp b/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.cpp
index 6650ca44ae..d69d969783 100644
--- a/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.cpp
@@ -50,14 +50,14 @@ QT_BEGIN_NAMESPACE
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QXcbGlIntegrationFactoryInterface_iid, QLatin1String("/xcbglintegrations"), Qt::CaseInsensitive))
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
(QXcbGlIntegrationFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
-#endif // !QT_NO_LIBRARY
+#endif // QT_CONFIG(library)
QXcbGlIntegration *QXcbGlIntegrationFactory::create(const QString &platform, const QString &pluginPath)
{
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
// Try loading the plugin from pluginPath first:
if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath);
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
index 56b2b1fd23..4e0c73450e 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
@@ -38,7 +38,9 @@
****************************************************************************/
#include <QDebug>
+#if QT_CONFIG(library)
#include <QLibrary>
+#endif
#include "qxcbwindow.h"
#include "qxcbscreen.h"
@@ -573,7 +575,7 @@ QFunctionPointer QGLXContext::getProcAddress(const char *procName)
if (!glXGetProcAddressARB)
#endif
{
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
extern const QString qt_gl_library_name();
// QLibrary lib(qt_gl_library_name());
QLibrary lib(QLatin1String("GL"));