Files
qt-creator/tests/auto/qml/codemodel/check/avoid-var.qml
Fawzi Mohamed cc00af8334 qmljs: fix qmljscheck
* fix ASTVariableReference::value: correctly get reference value type
by using either initialiser of bindingTarget (broken since a codemodel
update in 2018)
* disable warning for casting in bool to null comparison (it does not
cast, is always false)
* fix property checks (where skipped without default of readonly)
* remove non relevant checks (ErrInvalidPropertyType for lowercase  now that custom
value types are supported, and for properties called data)
* updated import version

Change-Id: I38407acf327d0f773b38dda4c02fb4d95a420851
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-02-03 14:03:44 +00:00

23 lines
742 B
QML

import QtQuick 2.0
Item {
property int x: 10
property var x: 10 // 311 14 16
readonly property string x: "abc"
property var x: "abc" // 311 14 16
property string x: true
property var x: true // 311 14 16
property color x: Qt.rgba(1, 1, 1, 1)
property var x: Qt.rgba(1, 1, 1, 1) // 311 14 16
property point x: Qt.point(1, 1)
property var x: Qt.point(1, 1) // 311 14 16
property rect x: Qt.rect(1, 1, 1, 1)
property var x: Qt.rect(1, 1, 1, 1) // 311 14 16
property size x: Qt.size(1, 1)
property var x: Qt.size(1, 1) // 311 14 16
property vector3d x: Qt.vector3d(1, 1, 1)
property var x: Qt.vector3d(1, 1, 1) // 311 14 16
default property int x
required property var x
}