summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qjnienvironment.h
diff options
context:
space:
mode:
authorAssam Boudjelthia <assam.boudjelthia@qt.io>2021-04-15 16:52:44 +0300
committerAssam Boudjelthia <assam.boudjelthia@qt.io>2021-04-23 15:43:28 +0300
commitf4e23bf3deb69131f78eb78a1cb06da0fe72d9d4 (patch)
tree423bb588c65c6db91312f6e0ed9b1895f5daaa3f /src/corelib/kernel/qjnienvironment.h
parent2666f3e37d6c8f2125f77f8de2cf5582ead7c18e (diff)
Fix QJniObject templates implementations
Define the template calls in the header to allow for better type handling and checking with constexpr and avoid overuse of macros. Depending on the type provided in the QJniObject's call, the signatures and the correct JNI function variant is used. If a type is not supported a static_assert throws a compiler error. Pick-to: 6.1 6.1.0 Change-Id: I8a4d3ce85e1ff76ef385633f2a68511fffd12e55 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/corelib/kernel/qjnienvironment.h')
-rw-r--r--src/corelib/kernel/qjnienvironment.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/corelib/kernel/qjnienvironment.h b/src/corelib/kernel/qjnienvironment.h
index a9a3e99097..69a24cbe18 100644
--- a/src/corelib/kernel/qjnienvironment.h
+++ b/src/corelib/kernel/qjnienvironment.h
@@ -44,12 +44,6 @@
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
#include <jni.h>
-#else
-class JNIEnv;
-class JNINativeMethod;
-class JavaVM;
-class jclass;
-#endif
QT_BEGIN_NAMESPACE
@@ -82,4 +76,6 @@ private:
QT_END_NAMESPACE
+#endif
+
#endif // QJNI_ENVIRONMENT_H