qtdeclarative/tests/auto/qtquickview
Petri Virkkunen 9fd9e881b2 QQ4A: Allow QML functions to be called from Java
This commit adds an API to QtQuickView and QtQuickViewContent which
allows users to call QML functions, with the following limitations:
     * The function parameters must have type information
     * The function parameters must be supported types: real, double, int,
     boolean or string.
     * The function cannot return a value

In the case of functions in QtQuickViewContent descendant classes,
these limitations are enforced by the code generation in
androiddeployqt.

To continue the journey of a function call from Java to QML, this
commit provides a JNI function which takes the view memory address,
the function name and a list of parameters, which may be empty.

When called, the JNI functions will look for a function with the given
name and parameter count, and if found, will convert the data from JNI
types into the expected QML types.

After converting the data, the data and QMetaMethod are passed to
QMetaMethodInvoker::invokeImpl which actually invokes the QML function.

Task-number: QTBUG-137112
Change-Id: I6617e3f5e1ebfcec7e44887d4e01b5137245ac0d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-09-01 20:25:21 +03:00
..
basic Disable QT_USE_ANDROID_MODERN_BUNDLE for unsupported tests 2025-07-15 07:10:34 +02:00
functions QQ4A: Allow QML functions to be called from Java 2025-09-01 20:25:21 +03:00
signallistener QQ4A: Add tests for early signal listeners 2025-08-08 16:25:56 +03:00
signalqueue QQ4A: Add QtSignalQueue class to manage queued signal connections 2025-08-08 16:25:56 +03:00
statuslistener Disable QT_USE_ANDROID_MODERN_BUNDLE for unsupported tests 2025-07-15 07:10:34 +02:00
CMakeLists.txt QQ4A: Allow QML functions to be called from Java 2025-09-01 20:25:21 +03:00