Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.5
-
842fe4dd27 (qt/qtdeclarative/dev) 842fe4dd27 (qt/tqtc-qtdeclarative/dev)
Description
With current qqtdeclarative dev I got new warning that "function not function" for columnProvider.
For code from here: https://doc.qt.io/qt-6/qml-qtquick-tableview.html#row-heights-and-column-widths
import QtQuick TableView { id: tableView property var columnWidths: [100, 50, 80, 150] columnWidthProvider: function (column) { return columnWidths[column] } Timer { running: true interval: 2000 onTriggered: { tableView.columnWidths[2] = 150 tableView.forceLayout(); } } }
qmllint reports:
Warning: Test.qml:7:26: Unexpected type for property "columnWidthProvider" expected function got function columnWidthProvider: function (column) { return columnWidths[column] } ^^^^^^^^^
After I reverted this commit:
commit 50ce71ae72b9ca90c52f77aa5b3ba78d63da89ae Author: Maximilian Goldstein <max.goldstein@qt.io> Date: Wed May 18 12:04:37 2022 +0200 QmlLintQuickPlugin: Warn about unexpected property binding types Sometimes we use var or Item property types when we actually expect some very specific types. We warn about these at runtime, let's also warn in the linter. Task-number: QTBUG-102859
buggy warning disappears.