summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAssam Boudjelthia <assam.boudjelthia@qt.io>2021-04-16 10:51:41 +0300
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-04-18 06:21:07 +0000
commitbc0e309adc3e516c1465211c1e9472e7757b3299 (patch)
tree4e0893a14ecb2212bcac1dbe94b1362f770a00e7
parent481a0388ae7816b2b0c140014353670ebe94ea46 (diff)
Add documentation links for some JNI entities
Add doc page link for: * AttachCurrentThread call. * Interface Function Table which describes JNIEnv. Change-Id: I12b41429c40838e5133e58132930aede287e2e71 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit d72067c93833e9787a45aeddee800faab0d2d40a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/corelib/doc/src/external-resources.qdoc12
-rw-r--r--src/corelib/kernel/qjnienvironment.cpp6
-rw-r--r--src/corelib/kernel/qjniobject.cpp2
3 files changed, 16 insertions, 4 deletions
diff --git a/src/corelib/doc/src/external-resources.qdoc b/src/corelib/doc/src/external-resources.qdoc
index 583e668be4..abd359ac33 100644
--- a/src/corelib/doc/src/external-resources.qdoc
+++ b/src/corelib/doc/src/external-resources.qdoc
@@ -78,7 +78,7 @@
/*!
\externalpage https://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/functions.html
- \title Oracle: JNI Functions
+ \title Java: JNI Functions
*/
/*!
@@ -90,3 +90,13 @@
\externalpage https://developer.android.com/training/articles/perf-jni#local-and-global-references
\title JNI tips: Local and global references
*/
+
+/*!
+ \externalpage https://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/invocation.html#attach_current_thread
+ \title Java: AttachCurrentThread
+*/
+
+/*!
+ \externalpage https://docs.oracle.com/en/java/javase/13/docs/specs/jni/functions.html#interface-function-table
+ \title Java: Interface Function Table
+*/
diff --git a/src/corelib/kernel/qjnienvironment.cpp b/src/corelib/kernel/qjnienvironment.cpp
index 522c97bdc1..f7a5fcb686 100644
--- a/src/corelib/kernel/qjnienvironment.cpp
+++ b/src/corelib/kernel/qjnienvironment.cpp
@@ -60,6 +60,8 @@ QT_BEGIN_NAMESPACE
Since \c JNIEnv doesn't do much error checking, such as exception checking and clearing,
QJniEnvironment allows you to do that easily.
+ For more information about JNIEnv, see \l {Java: Interface Function Table}.
+
\note This API has been designed and tested for use with Android.
It has not been tested for other platforms.
*/
@@ -266,7 +268,7 @@ bool QJniEnvironment::registerNativeMethods(const char *className, JNINativeMeth
In contrast to \l QJniObject, which handles exceptions internally, if you
make JNI calls directly via \c JNIEnv, you need to clear any potential
exceptions after the call using this function. For more information about
- \c JNIEnv calls that can throw an exception, see \l {Oracle: JNI Functions}{JNI Functions}.
+ \c JNIEnv calls that can throw an exception, see \l {Java: JNI Functions}{JNI Functions}.
\return \c true when a pending exception was cleared.
*/
@@ -293,7 +295,7 @@ bool QJniEnvironment::checkAndClearExceptions(QJniEnvironment::OutputMode output
In contrast to \l QJniObject, which handles exceptions internally, if you
make JNI calls directly via \c JNIEnv, you need to clear any potential
exceptions after the call using this function. For more information about
- \c JNIEnv calls that can throw an exception, see \l {Oracle: JNI Functions}{JNI Functions}.
+ \c JNIEnv calls that can throw an exception, see \l {Java: JNI Functions}{JNI Functions}.
\return \c true when a pending exception was cleared.
*/
diff --git a/src/corelib/kernel/qjniobject.cpp b/src/corelib/kernel/qjniobject.cpp
index 9bd71c061e..418a404bb4 100644
--- a/src/corelib/kernel/qjniobject.cpp
+++ b/src/corelib/kernel/qjniobject.cpp
@@ -160,7 +160,7 @@ QT_BEGIN_NAMESPACE
\l {JNI Design Overview: Global and Local References}. Local references
created outside a native method scope must be deleted manually, since
the garbage collector will not free them automatically because we are using
- \c AttachCurrentThread. For more information, see
+ \l {Java: AttachCurrentThread}{AttachCurrentThread}. For more information, see
\l {JNI tips: Local and global references}.
If you want to keep a Java object alive you need to either create a new global