From 4af257eb3cfeef93adefda5f981742ffb58ba0ad Mon Sep 17 00:00:00 2001 From: Bernd Weimer Date: Tue, 8 Apr 2014 09:38:28 +0200 Subject: 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 --- src/corelib/plugin/qlibrary_unix.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/corelib/plugin') 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 -- cgit v1.2.3