diff --git a/src/corelib/kernel/qjniobject.cpp b/src/corelib/kernel/qjniobject.cpp index 8f21835a1fd..1b1432e4e34 100644 --- a/src/corelib/kernel/qjniobject.cpp +++ b/src/corelib/kernel/qjniobject.cpp @@ -761,6 +761,21 @@ QJniObject::QJniObject(jobject object) env->DeleteLocalRef(cls); } +/*! + \fn template static inline QJniObject construct(Args &&...args) + \since 6.4 + + Constructs an instance of the Java class that is the equivalent of \c Class and + returns a QJniObject containing the JNI object. The arguments in \a args are + passed to the Java constructor. + + \code + QJniObject javaString = QJniObject::construct(); + \endcode + + This function is only available if all \a args are known \l {JNI Types}. +*/ + /*! \brief Get a JNI object from a jobject variant and do the necessary exception clearing and delete the local reference before returning.