diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-06-28 13:27:07 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-06-28 13:27:07 +0200 |
commit | c51e79a1da311255f92500ba08bb773103cb15fa (patch) | |
tree | 578d0787890dad01ec09e1ec7212f318a9e7e98c /tests/auto/qandroidjnienvironment/tst_qandroidjnienvironment.cpp | |
parent | 3af884ca599c476e078cb38461ad1117c57dc4a3 (diff) | |
parent | e0b68dfe82b350f5502e939d9cd2ff8a680f846a (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
.qmake.conf
Change-Id: I513a9d5e99c2cfb2b5225850fa89394365a8d26b
Diffstat (limited to 'tests/auto/qandroidjnienvironment/tst_qandroidjnienvironment.cpp')
-rw-r--r-- | tests/auto/qandroidjnienvironment/tst_qandroidjnienvironment.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/qandroidjnienvironment/tst_qandroidjnienvironment.cpp b/tests/auto/qandroidjnienvironment/tst_qandroidjnienvironment.cpp index f0f8fa6..3aa2033 100644 --- a/tests/auto/qandroidjnienvironment/tst_qandroidjnienvironment.cpp +++ b/tests/auto/qandroidjnienvironment/tst_qandroidjnienvironment.cpp @@ -66,9 +66,10 @@ void tst_QAndroidJniEnvironment::jniEnv() env->ExceptionClear(); } - // The environment should automatically be detached when QAndroidJniEnvironment goes out of scope - JNIEnv *jni = 0; - QCOMPARE(javaVM->GetEnv((void**)&jni, JNI_VERSION_1_6), JNI_EDETACHED); + // The env does not detach automatically, even if it goes out of scope. The only way it can + // be detached is if it's done explicitly, or if the thread we attached to gets killed (TLS clean-up). + JNIEnv *jni = nullptr; + QCOMPARE(javaVM->GetEnv((void**)&jni, JNI_VERSION_1_6), JNI_OK); } void tst_QAndroidJniEnvironment::javaVM() |