From 4dfbbe66b18538435b161dc2c86216f42814902b Mon Sep 17 00:00:00 2001 From: Soheil Armin Date: Thu, 16 Jan 2025 11:26:36 +0200 Subject: [PATCH] Android: Fix incorrect JNI call from QAndroidItemModelProxy::sibling() The return type of the QtAbstractItemModel.sibling() method is a QtModelIndex Java type. The JNI call from QAndroidItemModelProxy::sibling() is using as return type of QJniObject::callMethod(). This will result in a non-matching JVM function signature. This change replaces jobject with JQtModelIndex as the QtJniType. Fixes: QTBUG-132841 Change-Id: If157858f1ed49e25c8fbdfb9bb5c1fc2b7052826 Reviewed-by: Assam Boudjelthia (cherry picked from commit 190c85b706ee80bc92d6419676dca0dbfa60587b) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit bbcf5a419102f1c9d6e96fc8f75edaf20c7a198e) --- src/corelib/platform/android/qandroiditemmodelproxy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/platform/android/qandroiditemmodelproxy.cpp b/src/corelib/platform/android/qandroiditemmodelproxy.cpp index e5e5b6f2f3c..ad93c8dfc50 100644 --- a/src/corelib/platform/android/qandroiditemmodelproxy.cpp +++ b/src/corelib/platform/android/qandroiditemmodelproxy.cpp @@ -125,7 +125,7 @@ QModelIndex QAndroidItemModelProxy::sibling(int row, int column, const QModelInd { Q_ASSERT(jInstance.isValid()); const QMutexLocker lock = getMutexLocker(this); - return QAndroidModelIndexProxy::qInstance(jInstance.callMethod( + return QAndroidModelIndexProxy::qInstance(jInstance.callMethod( "sibling", row, column, QAndroidModelIndexProxy::jInstance(parent))); }