summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel/qjniobject/testdata/src/org/qtproject/qt
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2023-09-28 11:47:07 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2023-09-29 16:50:41 +0200
commit9b37762c5502bab72970932cd59bb38b2ed33720 (patch)
tree1e8e64cda1e01e765dda7dec51d6b891bb4e7ab7 /tests/auto/corelib/kernel/qjniobject/testdata/src/org/qtproject/qt
parent9800c63533c6b975d0a19fb4079ac15de07a7363 (diff)
JNI: Add promotion for signed char and extend test case
The jbyte type is a signed char, which also promotes to int in variadic argument functions. Extend the test case to make sure that we don't get any warnings for the most relevant parameter types. Change-Id: I7811e1eebdbc989ab5989eb1a2c502acd0540bc7 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
Diffstat (limited to 'tests/auto/corelib/kernel/qjniobject/testdata/src/org/qtproject/qt')
-rw-r--r--tests/auto/corelib/kernel/qjniobject/testdata/src/org/qtproject/qt/android/testdata/QtJniObjectTestClass.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/corelib/kernel/qjniobject/testdata/src/org/qtproject/qt/android/testdata/QtJniObjectTestClass.java b/tests/auto/corelib/kernel/qjniobject/testdata/src/org/qtproject/qt/android/testdata/QtJniObjectTestClass.java
index 813aaf2bbf..0775f2fde6 100644
--- a/tests/auto/corelib/kernel/qjniobject/testdata/src/org/qtproject/qt/android/testdata/QtJniObjectTestClass.java
+++ b/tests/auto/corelib/kernel/qjniobject/testdata/src/org/qtproject/qt/android/testdata/QtJniObjectTestClass.java
@@ -173,9 +173,33 @@ public class QtJniObjectTestClass
// --------------------------------------------------------------------------------------------
native public int callbackWithObject(QtJniObjectTestClass that);
+ native public int callbackWithByte(byte value);
+ native public int callbackWithBoolean(boolean value);
+ native public int callbackWithInt(int value);
+ native public int callbackWithDouble(double value);
public int callMeBackWithObject(QtJniObjectTestClass that)
{
return callbackWithObject(that);
}
+
+ public int callMeBackWithByte(byte value)
+ {
+ return callbackWithByte(value);
+ }
+
+ public int callMeBackWithBoolean(boolean value)
+ {
+ return callbackWithBoolean(value);
+ }
+
+ public int callMeBackWithInt(int value)
+ {
+ return callbackWithInt(value);
+ }
+
+ public int callMeBackWithDouble(double value)
+ {
+ return callbackWithDouble(value);
+ }
}