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 <jobject> 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. Pick-to: 6.8 6.9 Fixes: QTBUG-132841 Change-Id: If157858f1ed49e25c8fbdfb9bb5c1fc2b7052826 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
parent
0107e05e50
commit
190c85b706
@ -125,7 +125,7 @@ QModelIndex QAndroidItemModelProxy::sibling(int row, int column, const QModelInd
|
||||
{
|
||||
Q_ASSERT(jInstance.isValid());
|
||||
const QMutexLocker<QRecursiveMutex> lock = getMutexLocker(this);
|
||||
return QAndroidModelIndexProxy::qInstance(jInstance.callMethod<jobject>(
|
||||
return QAndroidModelIndexProxy::qInstance(jInstance.callMethod<JQtModelIndex>(
|
||||
"sibling", row, column, QAndroidModelIndexProxy::jInstance(parent)));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user