From 31d6daf209ca14aea1ebd80abd070f17d7f220d1 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 28 Mar 2023 11:02:13 +0200 Subject: [PATCH] QmlDesigner: Fix __modelIndex for Qt 6.4.3 Since this is a throw away branch we can hardcode the fix for Qt 6.4.3. See 0c7ae672a211d670d70e6a872809b76919e17b45 for the proper fix. Task-number: QDS-9560 Change-Id: Ic519541e2f6ed3efa5e38c9dbeb71390632b8b58 Reviewed-by: Thomas Hartmann Reviewed-by: Tim Jenssen --- .../qmldesigner/itemLibraryQmlSources/AssetsView.qml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/AssetsView.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/AssetsView.qml index dffef336202..c933683072a 100644 --- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/AssetsView.qml +++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/AssetsView.qml @@ -302,13 +302,9 @@ TreeView { function __modelIndex(row) { - // The modelIndex() function exists since 6.3. In Qt 6.3, this modelIndex() function was a - // member of the TreeView, while in Qt6.4 it was moved to TableView. In Qt6.4, the order of - // the arguments was changed. - if (assetsRoot.qtVersion6_4) - return root.modelIndex(0, row) - else - return root.modelIndex(row, 0) + + return root.index(row, 0) + } DropArea {