Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.0.4, 6.1.2, 6.1, 6.2.0 Alpha
-
6.1
-
b28c8c87ec84dccc156603f8479fd0a8a06bc46c (qt/qtdeclarative/dev) 62400a6278f5f36e231f89d86e3d036f4c9e457c (qt/qtdeclarative/6.1.2)
Description
I build qtdeclarative from 76a7c93f9b860e2f6fde2198edde19a5d704a97f .
For code below qmllint produces warning:
$ /usr/local/qt6_tools/bin/qmllint Test.qml Warning: Test.qml:7:48: Property "length" not found on type "QString" console.log("text.length", textInput.text.length);
qml Test.qml works just fine, and print resulted length, so this is valid QML code.
Not sure what error is, no special handling for "QString", or that qmllint can not understand that in JavaScript it has type "string". As I see for "string" there is special handling for "length" property.
import QtQuick 2.15 TextInput { id: textInput Component.onCompleted: { console.log("text.length", textInput.text.length); } }
Attachments
For Gerrit Dashboard: QTBUG-92447 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
342127,2 | Fix string type name in qmllint | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
342154,4 | When resolving property types, also update the property type names | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
342259,4 | Fix string type name in qmllint | 6.1 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
342260,3 | Fix string type name in qmllint | 6.0 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
342261,3 | When resolving property types, also update the property type names | 6.1 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
342262,3 | When resolving property types, also update the property type names | 6.0 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
342320,2 | qmllint: Initialize special casing for QString on checkMemberAccess() | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |