diff options
author | Liang Qi <liang.qi@qt.io> | 2018-02-14 11:27:58 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-02-14 12:51:24 +0100 |
commit | 305dd1b61f657474d751cc3b24f58249ec21b61b (patch) | |
tree | 5a90972ecf0f3e499625482d194903b474d9ece6 /src/corelib/plugin/qlibrary_unix.cpp | |
parent | 76010f4af8c9a59a20c489d70c7f99b802f9721f (diff) | |
parent | dfffb5299bf83b87607f28f55afaf3c404910f9f (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.11
Conflicts:
.qmake.conf
src/corelib/animation/qvariantanimation.cpp
src/corelib/global/qglobal.cpp
src/corelib/global/qlogging.cpp
src/corelib/io/qprocess_win.cpp
src/corelib/json/qjsonarray.cpp
src/corelib/tools/qsimd_p.h
src/corelib/tools/qtimezoneprivate_p.h
src/corelib/xml/qxmlstream_p.h
src/gui/kernel/qsimpledrag.cpp
src/gui/kernel/qsimpledrag_p.h
src/plugins/generic/generic.pro
src/plugins/platforms/cocoa/qcocoamenu.mm
src/widgets/styles/qmacstyle_mac.mm
tests/auto/concurrent/qtconcurrentmap/BLACKLIST
tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
tests/auto/gui/kernel/qwindow/BLACKLIST
tests/auto/widgets/dialogs/qmessagebox/BLACKLIST
Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
Diffstat (limited to 'src/corelib/plugin/qlibrary_unix.cpp')
-rw-r--r-- | src/corelib/plugin/qlibrary_unix.cpp | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp index 3c4fbaf348..23b9ad6434 100644 --- a/src/corelib/plugin/qlibrary_unix.cpp +++ b/src/corelib/plugin/qlibrary_unix.cpp @@ -44,25 +44,17 @@ #include <qcoreapplication.h> #include <private/qfilesystementry_p.h> +#include <dlfcn.h> + #ifdef Q_OS_MAC # include <private/qcore_mac_p.h> #endif QT_BEGIN_NAMESPACE -#if !defined(QT_HPUX_LD) -QT_BEGIN_INCLUDE_NAMESPACE -#include <dlfcn.h> -QT_END_INCLUDE_NAMESPACE -#endif - static QString qdlerror() { -#if !defined(QT_HPUX_LD) const char *err = dlerror(); -#else - const char *err = strerror(errno); -#endif return err ? QLatin1Char('(') + QString::fromLocal8Bit(err) + QLatin1Char(')'): QString(); } @@ -139,14 +131,6 @@ bool QLibraryPrivate::load_sys() suffixes = suffixes_sys(fullVersion); } int dlFlags = 0; -#if defined(QT_HPUX_LD) - dlFlags = DYNAMIC_PATH | BIND_NONFATAL; - if (loadHints & QLibrary::ResolveAllSymbolsHint) { - dlFlags |= BIND_IMMEDIATE; - } else { - dlFlags |= BIND_DEFERRED; - } -#else int loadHints = this->loadHints(); if (loadHints & QLibrary::ResolveAllSymbolsHint) { dlFlags |= RTLD_NOW; @@ -182,7 +166,6 @@ bool QLibraryPrivate::load_sys() dlFlags |= RTLD_MEMBER; } #endif -#endif // QT_HPUX_LD // If the filename is an absolute path then we want to try that first as it is most likely // what the callee wants. If we have been given a non-absolute path then lets try the @@ -211,11 +194,7 @@ bool QLibraryPrivate::load_sys() } else { attempt = path + prefixes.at(prefix) + name + suffixes.at(suffix); } -#if defined(QT_HPUX_LD) - pHnd = (void*)shl_load(QFile::encodeName(attempt), dlFlags, 0); -#else pHnd = dlopen(QFile::encodeName(attempt), dlFlags); -#endif if (!pHnd && fileName.startsWith(QLatin1Char('/')) && QFile::exists(attempt)) { // We only want to continue if dlopen failed due to that the shared library did not exist. @@ -253,11 +232,7 @@ bool QLibraryPrivate::load_sys() bool QLibraryPrivate::unload_sys() { -#if defined(QT_HPUX_LD) - if (shl_unload((shl_t)pHnd)) { -#else if (dlclose(pHnd)) { -#endif #if defined (Q_OS_QNX) // Workaround until fixed in QNX; fixes crash in char *error = dlerror(); // QtDeclarative auto test "qqmlenginecleanup" for instance if (!qstrcmp(error, "Shared objects still referenced")) // On QNX that's only "informative" @@ -289,13 +264,7 @@ Q_CORE_EXPORT QFunctionPointer qt_mac_resolve_sys(void *handle, const char *symb QFunctionPointer QLibraryPrivate::resolve_sys(const char* symbol) { -#if defined(QT_HPUX_LD) - QFunctionPointer address = 0; - if (shl_findsym((shl_t*)&pHnd, symbol, TYPE_UNDEFINED, &address) < 0) - address = 0; -#else QFunctionPointer address = QFunctionPointer(dlsym(pHnd, symbol)); -#endif if (!address) { errorString = QLibrary::tr("Cannot resolve symbol \"%1\" in %2: %3").arg( QString::fromLatin1(symbol), fileName, qdlerror()); |