Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.5, 6.5, 6.6.3, 6.7.0 Beta3, 6.8.0 FF
-
6.5.0
-
None
-
7bc52d660 (dev), 3dff3ce1b (6.7), c753d52d8 (6.6), c6416101b (tqtc/lts-6.5)
Description
If you take code from https://bugreports.qt.io/browse/QTBUG-105251
import QtQuick Window { width: 640 height: 480 visible: true title: 'Resolve my color type' Item { id: foo states: [ State { PropertyChanges { target: foo myColor: Qt.rgba(0.5, 0.5, 0.5, 0.16) } } ] property color myColor: 'black' } }
qmllint reports:
Warning: /var/tmp/Test1.qml:16:30: Property "myColor" is custom-parsed in PropertyChanges. You should phrase this binding as "foo.myColor: Qt.rgba(0.5, ..." [Quick.property-changes-parsed] myColor: Qt.rgba(0.5, 0.5, 0.5, 0.16) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
But if this apply suggested fix:
import QtQuick Window { width: 640 height: 480 visible: true title: 'Resolve my color type' Item { id: foo states: [ State { PropertyChanges { target: foo foo.myColor: Qt.rgba(0.5, 0.5, 0.5, 0.16) } } ] property color myColor: 'black' } }
qmllint reports:
Warning: /var/tmp/Test1.qml:16:21: Unknown property "foo" in PropertyChanges. [Quick.property-changes-parsed] foo.myColor: Qt.rgba(0.5, 0.5, 0.5, 0.16) ^^^
while "qml" uitlity parses the changed qml without any errors.
Attachments
Issue Links
- relates to
-
QTBUG-120526 qmllint complains wrongly when changing Layout attached properties in a PropertyChanges
- Closed