Logo
Explore Help
Sign In
feedc0de/qt-creator
1
0
Fork 0
You've already forked qt-creator
forked from qt-creator/qt-creator
Code Pull Requests Activity
Files
dfadc17cb59cf479fe48b5cb15bf3d6bebb023eb
qt-creator/tests/auto/qml/codemodel/check/avoid-some-constructors.qml

15 lines
343 B
QML
Raw Normal View History

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-01-13 02:02:49 +01:00
import QtQuick 2.0
QmlJS checks: Warn when using some builtin constructors. Number, String, Array, Object, Function and Boolean should not be used. Migrated from QtChecker. Change-Id: I8aee41f12389196ed49c44e26eb04d3fac040a2b Reviewed-on: http://codereview.qt-project.org/5859 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-09-30 11:11:01 +02:00
Item {
function foo() {
var x = new Number(); // 308 21 26
x = new String(); // 110 17 22
x = new Array(); // 112 17 21
x = new Object(); // 111 17 22
x = new Function(); // 113 17 24
x = new Boolean() // 109 17 23
x = new Date()
x = new Array(6)
}
}
Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 164ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API