summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin
diff options
context:
space:
mode:
authorAssam Boudjelthia <assam.boudjelthia@qt.io>2021-02-10 13:18:43 +0200
committerAssam Boudjelthia <assam.boudjelthia@qt.io>2021-02-11 16:03:43 +0200
commit3348107c038cbac724e33d6bb30671ddddc1505a (patch)
tree7c2c41ee8dcec7a8f1d431dee5b8a242244ecf00 /src/corelib/plugin
parentf0f00dbd119e0169bc81aa761e4d548e4ecf2214 (diff)
Android: take JavaVM() from QJniEnvironment and not QtAndroidPrivate
Task-number: QTBUG-89482 Pick-to: 6.1 Change-Id: Idfd442afc90c00e672b28b43c78c789813f46c7d Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/corelib/plugin')
-rw-r--r--src/corelib/plugin/qlibrary_unix.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp
index 95aeee8732..0be3d43e3d 100644
--- a/src/corelib/plugin/qlibrary_unix.cpp
+++ b/src/corelib/plugin/qlibrary_unix.cpp
@@ -53,7 +53,8 @@
#endif
#ifdef Q_OS_ANDROID
-# include <private/qjnihelpers_p.h>
+#include <private/qjnihelpers_p.h>
+#include <QtCore/qjnienvironment.h>
#endif
QT_BEGIN_NAMESPACE
@@ -244,7 +245,7 @@ bool QLibraryPrivate::load_sys()
if (hnd) {
using JniOnLoadPtr = jint (*)(JavaVM *vm, void *reserved);
JniOnLoadPtr jniOnLoad = reinterpret_cast<JniOnLoadPtr>(dlsym(hnd, "JNI_OnLoad"));
- if (jniOnLoad && jniOnLoad(QtAndroidPrivate::javaVM(), nullptr) == JNI_ERR) {
+ if (jniOnLoad && jniOnLoad(QJniEnvironment::javaVM(), nullptr) == JNI_ERR) {
dlclose(hnd);
hnd = nullptr;
}