diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-06-19 12:23:47 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-06-20 16:08:35 +0200 |
commit | 145bfe6054f8f7fcc32d0442e8845aa59af2fc1a (patch) | |
tree | c6fdbb841a9ecdd54505ed6718eb7c15ac3428b5 /src | |
parent | e0a729dfd202c95dc858c71e95fe0072821b2b21 (diff) |
Document QJniObject::construct
Added for 6.4. Not extremely useful as long as the macros that allow
the declaration of new class and type strings also being documented.
Pick-to: 6.4
Change-Id: I9ee466fdd0aaccec1e627ceb313b5a5c17e3f3fa
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qjniobject.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/corelib/kernel/qjniobject.cpp b/src/corelib/kernel/qjniobject.cpp index 8f21835a1f..1b1432e4e3 100644 --- a/src/corelib/kernel/qjniobject.cpp +++ b/src/corelib/kernel/qjniobject.cpp @@ -762,6 +762,21 @@ QJniObject::QJniObject(jobject object) } /*! + \fn template<typename Class, typename ...Args> 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<jstring>(); + \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. The JNI object can be null if there was an exception. |