From 9834536cfaa903048c8ae510387606cd055658e6 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 2 Apr 2020 12:02:55 -0300 Subject: QLibrary/Android: Correct improper merging I had originally developed ae6f73e8566fa76470937aca737141183929a5ec in 5.13, where this code for Android didn't exist. I didn't notice the use of pHnd there when I merged up for the push. Change-Id: Ibdc95e9af7bd456a94ecfffd160208dfaa596d95 Reviewed-by: BogDan Vatra --- src/corelib/plugin/qlibrary_unix.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/corelib/plugin/qlibrary_unix.cpp') diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp index 29813e5863..017aa97b66 100644 --- a/src/corelib/plugin/qlibrary_unix.cpp +++ b/src/corelib/plugin/qlibrary_unix.cpp @@ -235,15 +235,15 @@ bool QLibraryPrivate::load_sys() hnd = dlopen(QFile::encodeName(attempt), dlFlags); #ifdef Q_OS_ANDROID - if (!pHnd) { + if (!hnd) { auto attemptFromBundle = attempt; - pHnd = dlopen(QFile::encodeName(attemptFromBundle.replace(QLatin1Char('/'), QLatin1Char('_'))), dlFlags); + hnd = dlopen(QFile::encodeName(attemptFromBundle.replace(QLatin1Char('/'), QLatin1Char('_'))), dlFlags); } - if (pHnd) { + if (hnd) { using JniOnLoadPtr = jint (*)(JavaVM *vm, void *reserved); JniOnLoadPtr jniOnLoad = reinterpret_cast(dlsym(pHnd, "JNI_OnLoad")); if (jniOnLoad && jniOnLoad(QtAndroidPrivate::javaVM(), nullptr) == JNI_ERR) { - dlclose(pHnd); + dlclose(hnd); pHnd = nullptr; } } -- cgit v1.2.3