diff options
author | Bernd Weimer <bweimer@blackberry.com> | 2014-04-08 09:38:28 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-09 20:53:06 +0200 |
commit | 4af257eb3cfeef93adefda5f981742ffb58ba0ad (patch) | |
tree | 931f4ba8c67559ebbfd22852b0f5d69e49666927 /src/corelib/plugin/qlibrary_unix.cpp | |
parent | db14f5fd605904965402042d656c73fc65fb6615 (diff) |
QNX: Work around dlclose issue
"Shared objects still referenced" dlerror should actually be treated as
"for your information" only, not as an actual error.
Change-Id: Ie02bd1db0dd2dc93bb759f8b6c7e825070e17bb9
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Diffstat (limited to 'src/corelib/plugin/qlibrary_unix.cpp')
-rw-r--r-- | src/corelib/plugin/qlibrary_unix.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp index e89d6396f6..43e2b5c15b 100644 --- a/src/corelib/plugin/qlibrary_unix.cpp +++ b/src/corelib/plugin/qlibrary_unix.cpp @@ -273,7 +273,15 @@ bool QLibraryPrivate::unload_sys() # 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" + return true; + errorString = QLibrary::tr("Cannot unload library %1: %2").arg(fileName) + .arg(QLatin1String(error)); +# else errorString = QLibrary::tr("Cannot unload library %1: %2").arg(fileName).arg(qdlerror()); +# endif return false; } #endif |