From 6b5dc82f32eba3fd6f54061095bbf218d9076a75 Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Thu, 19 Jul 2012 11:01:20 +0100 Subject: Use improved QLibrary search heuristics in qapplication_x11.cpp Change-Id: I9db2572ea2d437ecbba94911e1dfb9d0cb6503a4 Reviewed-by: Thiago Macieira --- src/gui/kernel/qapplication_x11.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 7460fa0..4e8c7f3 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -483,6 +483,7 @@ static void* qt_load_library_runtime(const char *library, int vernum, Q_FOREACH(int version, versions) { QLatin1String libName(library); QLibrary xfixesLib(libName, version); + xfixesLib.setLoadHints(QLibrary::ImprovedSearchHeuristics); void *ptr = xfixesLib.resolve(symbol); if (ptr) return ptr; @@ -2011,6 +2012,7 @@ void qt_init(QApplicationPrivate *priv, int, X11->ptrXRRRootToScreen = 0; X11->ptrXRRQueryExtension = 0; QLibrary xrandrLib(QLatin1String("Xrandr"), 2); + xrandrLib.setLoadHints(QLibrary::ImprovedSearchHeuristics); if (!xrandrLib.load()) { // try without the version number xrandrLib.setFileName(QLatin1String("Xrandr")); xrandrLib.load(); @@ -2091,6 +2093,7 @@ void qt_init(QApplicationPrivate *priv, int, #ifdef QT_RUNTIME_XCURSOR X11->ptrXcursorLibraryLoadCursor = 0; QLibrary xcursorLib(QLatin1String("Xcursor"), 1); + xcursorLib.setLoadHints(QLibrary::ImprovedSearchHeuristics); bool xcursorFound = xcursorLib.load(); if (!xcursorFound) { //try without the version number xcursorLib.setFileName(QLatin1String("Xcursor")); @@ -2118,6 +2121,7 @@ void qt_init(QApplicationPrivate *priv, int, X11->ptrXineramaIsActive = 0; X11->ptrXineramaQueryScreens = 0; QLibrary xineramaLib(QLatin1String("Xinerama"), 1); + xineramaLib.setLoadHints(QLibrary::ImprovedSearchHeuristics); bool xineramaFound = xineramaLib.load(); if (!xineramaFound) { //try without the version number xineramaLib.setFileName(QLatin1String("Xinerama")); @@ -2631,6 +2635,7 @@ void qt_init(QApplicationPrivate *priv, int, #if !defined (Q_OS_IRIX) && !defined (QT_NO_TABLET) QLibrary wacom(QString::fromLatin1("wacomcfg"), 0); // version 0 is the latest release at time of writing this. + wacom.setLoadHints(QLibrary::ImprovedSearchHeuristics); // NOTE: C casts instead of reinterpret_cast for GCC 3.3.x ptrWacomConfigInit = (PtrWacomConfigInit)wacom.resolve("WacomConfigInit"); ptrWacomConfigOpenDevice = (PtrWacomConfigOpenDevice)wacom.resolve("WacomConfigOpenDevice"); -- cgit v0.12