From b93d1f6b1f90f9c24ba31b8c7c1b8d01327c05b9 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 11 Jun 2015 17:32:29 +0200 Subject: Don't try to resolve symbols for xcb if QT_NO_LIBRARY is set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I4bd5d8534abd9a585a4a641d01931de687eeae77 Reviewed-by: Jørgen Lind --- .../platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp | 2 ++ src/plugins/platforms/xcb/qxcbcursor.cpp | 10 +++++----- src/plugins/platforms/xcb/qxcbcursor.h | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) 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 397ee22987..bea25e8826 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp @@ -560,10 +560,12 @@ void (*QGLXContext::getProcAddress(const QByteArray &procName)) () if (!glXGetProcAddressARB) #endif { +#ifndef QT_NO_LIBRARY extern const QString qt_gl_library_name(); // QLibrary lib(qt_gl_library_name()); QLibrary lib(QLatin1String("GL")); glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB"); +#endif } } resolved = true; diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp index e51ab85e30..9d00367b9c 100644 --- a/src/plugins/platforms/xcb/qxcbcursor.cpp +++ b/src/plugins/platforms/xcb/qxcbcursor.cpp @@ -52,7 +52,7 @@ typedef char *(*PtrXcursorLibraryGetTheme)(void *); typedef int (*PtrXcursorLibrarySetTheme)(void *, const char *); typedef int (*PtrXcursorLibraryGetDefaultSize)(void *); -#ifdef XCB_USE_XLIB +#if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY) #include enum { XCursorShape = CursorShape @@ -300,7 +300,7 @@ QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen) const char *cursorStr = "cursor"; xcb_open_font(xcb_connection(), cursorFont, strlen(cursorStr), cursorStr); -#ifdef XCB_USE_XLIB +#if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY) static bool function_ptrs_not_initialized = true; if (function_ptrs_not_initialized) { QLibrary xcursorLib(QLatin1String("Xcursor"), 1); @@ -489,7 +489,7 @@ xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape) return cursor; } -#ifdef XCB_USE_XLIB +#if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY) bool updateCursorTheme(void *dpy, const QByteArray &theme) { if (!ptrXcursorLibraryGetTheme || !ptrXcursorLibrarySetTheme) @@ -533,7 +533,7 @@ static xcb_cursor_t loadCursor(void *dpy, int cshape) } return cursor; } -#endif //XCB_USE_XLIB +#endif //XCB_USE_XLIB / QT_NO_LIBRARY xcb_cursor_t QXcbCursor::createFontCursor(int cshape) { @@ -542,7 +542,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) xcb_cursor_t cursor = XCB_NONE; // Try Xcursor first -#ifdef XCB_USE_XLIB +#if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY) if (cshape >= 0 && cshape <= Qt::LastCursor) { void *dpy = connection()->xlib_display(); // special case for non-standard dnd-* cursors diff --git a/src/plugins/platforms/xcb/qxcbcursor.h b/src/plugins/platforms/xcb/qxcbcursor.h index 7e5cdc6870..f4f6e61706 100644 --- a/src/plugins/platforms/xcb/qxcbcursor.h +++ b/src/plugins/platforms/xcb/qxcbcursor.h @@ -90,7 +90,7 @@ private: #ifndef QT_NO_CURSOR CursorHash m_cursorHash; #endif -#ifdef XCB_USE_XLIB +#if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY) static void cursorThemePropertyChanged(QXcbVirtualDesktop *screen, const QByteArray &name, const QVariant &property, -- cgit v1.2.3