summaryrefslogtreecommitdiff
path: root/tests/auto/quick
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2022-12-20 13:12:39 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-12-21 02:28:28 +0000
commit46fb84841185b1776499868d276894444a94afe1 (patch)
tree6cb86c12d8a6e9601de52b25f80d85f56a58f6f6 /tests/auto/quick
parent3a509c301cb19ae03be652431acbcbe910395b0a (diff)
downloadqtdeclarative-46fb84841185b1776499868d276894444a94afe1.tar.gz
QQuickTableView: change the order of row and column to modelIndex()
In Qt 6.3, TreeView had a function called modelIndex(). This function took two arguments: row and column. In Qt 6.4, This function was moved into TableView (the superclass) instead, since it was needed in both classes. And in that process (probably because this was done in several patches), the order of the arguments got swapped, to conform with two other functions in TableView that took a column and row as argument. But this was a source incompatible change. The result is that TreeView in Qt 6.3 has a function modelIndex(row, column) that works differently compared to Qt 6.4.0. The signature there is modelIndex(column, row). This patch will therefore effectively revert that SiC, and let modelIndex() again take row and column as arguments, like in Qt 6.3. The downside is that we already have two versions of Qt released (6.4.0 and 6.4.1) that contains the SiC. We therefore offer an environment variable that can be set to use the swapped version, if needed. [ChangeLog][Quick][TreeView] Because of a source incompatible change in Qt 6.4.0 and Qt 6.4.1, modelIndex(column, row) has been reverted back to modelIndex(row, column), equal to how it was in Qt 6.3. This also affects modelIndex() in TableView. If the order used in Qt 6.4.1 is needed, you can set the environment variable QT_QUICK_TABLEVIEW_COMPAT_VERSION=6.4 Pick-to: 6.5 6.4 6.4.2 Fixes: QTBUG-109542 Change-Id: I6af5e978d42b06c61ab0728e5e8b71f2a0300d13 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/quick')
-rw-r--r--tests/auto/quick/qquicktableview/data/editdelegate.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/quick/qquicktableview/data/editdelegate.qml b/tests/auto/quick/qquicktableview/data/editdelegate.qml
index 569f62f70d..8219aaa3b0 100644
--- a/tests/auto/quick/qquicktableview/data/editdelegate.qml
+++ b/tests/auto/quick/qquicktableview/data/editdelegate.qml
@@ -45,7 +45,7 @@ Item {
Component.onCompleted: {
tableView.editItem = editRoot
- tableView.editIndex = tableView.modelIndex(column, row)
+ tableView.editIndex = tableView.modelIndex(row, column)
selectAll()
}