summaryrefslogtreecommitdiff
path: root/src/libs/qmljs/qmljscheck.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | QmlJS: More Qt6hjk2020-06-191-7/+8
|/ | | | | | | Mostly QRegExp, one QHash::unite. Change-Id: Ia2816fee65b9459c0f89419161f44c38cd572c36 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* QmlJSCheck: Add Error message for recursively instantiated typeThomas Hartmann2020-06-041-0/+3
| | | | | Change-Id: I68b46a929c65fb21ee8473cda44f7de4e40009c7 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlJS: remove unused QtQuick2 checkTim Jenssen2020-03-061-7/+2
| | | | | Change-Id: I7d613ba825a5ce3d4d8302adff9c98f751bc7ab1 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
* Update qmljs parser to Qt 5.15 parserFawzi Mohamed2020-03-031-0/+21
| | | | | | | | | | | | | * parser side support for annotations, inline components, new UiVersion and all the things included in QT 5.15 parser * SourceLocation moved from QmlJS:AST to QmlJS * Visitors now need to handle throwRecursionDepthError * BaseVisitor for visitors that want to override all visit Task-number: QTCREATORBUG-23591 Change-Id: I682a30d0b08b6c929739fd0e339ef6fbde3eb630 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QmlJSCheck: Allow animations in ui.qml filesThomas Hartmann2020-02-191-8/+1
| | | | | | Task-number: QDS-1613 Change-Id: I4beecff16d0b67652abbdb16945614d2497d3921 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlJS: Add check for duplicated importChristian Stenger2019-12-161-0/+20
| | | | | | | | | | Add a soft check for duplicated Qml/JS imports which adds a warning when a file contains imports that duplicate the same URI / version or file path. Change-Id: Ib9a1f8a90dd3cf469d90e83abc1d748901b1e353 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlJS: Add "Symbol, Object, Function, RegExp" to global functionsTim Jenssen2019-12-061-1/+2
| | | | | | | | | This fixes a false positive error message. Task-number: QTCREATORBUG-22599 Change-Id: Ibdf9a3a6b1679bd11afa87ca3d5e77fcda773ce0 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlJS: Update QML parser using the one from qtdeclarative 5.15Ulf Hermann2019-10-071-6/+6
| | | | | | | | | | | | | | | | We need to do this because the new "required" keyword should be recognized by Qt Creator. This is not a verbatim copy of the QML parser from qtdeclarative. A few data structures have changed that would require large scale changes in otherwise unrelated parts of the code. For example, all Visitors need to handle recursion depth errors now and the DiagnosticMessage only has line and column now, no longer begin and legth. Change-Id: Iea5b04e27b07e0cba55d64b844315af9828acbf7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Merge remote-tracking branch 'origin/4.10'Eike Ziller2019-09-121-5/+1
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri src/plugins/projectexplorer/gcctoolchain.cpp src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp Change-Id: Iffdf48e782a734107ea170ebb3812e997cea0e7b
| * QmlDesigner: Allow transformations in Qt Quick DesignerThomas Hartmann2019-09-051-5/+1
| | | | | | | | | | | | | | They are passively supported and we plan better support in the future. Change-Id: I22520335ae3dba5804ec4c8902624b4afe4254a3 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | QmlJS: Fix compiler warningsEike Ziller2019-09-041-33/+36
| | | | | | | | | | Change-Id: I94fccd913a4a06fb55acee3df974859f9a163b4f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Compile fix with recent Qt devhjk2019-07-291-3/+2
|/ | | | | | | | | The reasoning in 1b4766e26c6b did not take into account that the scope of QT_NO_JAVA_STYLE_ITERATORS may change over time, as done with f70905448f6 in Qt base. Change-Id: Ib1966ff26c4d36d5f62e149d6b45baa4aecf825d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* More Utils::toSet/toListhjk2019-07-041-2/+3
| | | | | | | ... and unrelated cosmetic changes. Change-Id: I591b17fd5289831e701b683f8fb47816efd1fa67 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* QmlJS: Add "Array" to global functionsThomas Hartmann2019-06-211-1/+1
| | | | | | | | This fixes a false positive error message. Task-number: QTCREATORBUG-22599 Change-Id: I54104857982873baaa092ad936586c3d245ce720 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlJS: Fix wrong warningChristian Stenger2019-05-161-8/+49
| | | | | | | | | Variable declarations made with let or const need to get evaluated on block level base. Task-number: QTCREATORBUG-22054 Change-Id: Ia1d353be61c2d9532bc54257c15d00fb33ea156c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Merge remote-tracking branch 'origin/4.8' into 4.9Eike Ziller2019-03-111-2/+2
|\ | | | | | | | | | | | | Conflicts: src/libs/qmljs/qmljscheck.cpp Change-Id: Ib3d97e8e59463185e2fa4663ae594c1e29b4b337
| * qmljs: Fix variable nameKai Koehne2019-03-071-2/+2
| | | | | | | | | | Change-Id: I8ea8d18e0471071f3a7a22760c041ecf77dbbe8c Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
| * Fix warningThomas Hartmann2019-01-181-1/+1
| | | | | | | | | | Change-Id: I646cf0d1c1e7dec7f44baf50a586ff22044cb7f0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | QmlJS: modernize the code a bitTim Jenssen2019-01-181-90/+91
| | | | | | | | | | | | | | | | | | - use nullptr instead of 0 - remove all QLatin* - use initializer for QStringLists Change-Id: I62db000e2644d1d2a2c1246e70e829e37d36f2f3 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | QmlJS: Fix unused variable warningOrgad Shaneh2019-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | By using it. Amends commit 66dc5e971399fbd7bf696344698b5bd3fb05b819. Change-Id: I21bfb7a2d83987f095bfd02b0cc20931e0feb68b Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | Merge remote-tracking branch 'origin/4.8'Eike Ziller2019-01-171-13/+17
|\ \ | |/ | | | | Change-Id: I400217ba1c8a531e0450c3012a07db3fc93638cf
| * QmlDesigner: Allow more JavaScript functionsThomas Hartmann2019-01-161-13/+17
| | | | | | | | | | | | Task-number: QDS-355 Change-Id: I0f330216b0120857f21b804236d2e3338c812749 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | qmljs: do not raise warning for yield statementsMarco Benelli2018-12-071-0/+1
| | | | | | | | | | | | Task-number: QTCREATORBUG-21301 Change-Id: I2b358039f808faf8f979eb21410fa827cc132a57 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | qmljs: update parserMarco Benelli2018-11-221-25/+9
|/ | | | | | | | | Update the qtcreator qmljs parser to the one of Qt 5.12. It supports EcmaScript 7. Task-number: QTCREATORBUG-20341 Change-Id: I0d1cff71402ba17e22cde6b46c65614e162280de Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* qmljs: Use C++11’s override and remove virtual where applicableAlessandro Portale2018-06-261-22/+22
| | | | | | | | Fixes warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override] Change-Id: I17955fd0fdb052678228f1bda32cd8d3b4298998 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* qmljs: remove remaining references to QtQuick1Marco Benelli2018-04-031-7/+0
| | | | | | | | This patch removes all references to QtQuick1 in qml library, plugin, designer, profiler and tests. Change-Id: Ie286fad96060299caae3ef328330597cf53e90d3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlJS: Allow NumberAnimation for ui.qml filesThomas Hartmann2018-03-071-1/+0
| | | | | Change-Id: I12836a2d7708d50278715139f0cfba5fa221f8eb Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* qmljs: relax checks for qbs filesMarco Benelli2018-02-271-0/+4
| | | | | | | | | | | Types information for qbs is more limited that qml; this causes qtcreator to raise false positives. This patch relax the checks and provide some type information needed by qbs files generated by the wizards. Task-number: QTCREATORBUG-19757 Change-Id: I07a1dd9d8fedaf4c5c751c2f00643f15ae39127a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* QmlJS: Add error message for dynamic property called "data"Thomas Hartmann2017-11-061-6/+11
| | | | | | | | | The default property of most QtQuick items is data and therefore "data" should not be used as a property name. Task-number: QTCREATORBUG-19225 Change-Id: I54d1b72ce984debd4c366b7261e93b7a81b8c940 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* qmljs: better handling of attached propertiesMarco Benelli2017-09-191-6/+16
| | | | | | | | | | Attached properties used to cause false positives in the highlighter, because when using qualified ids, only the first part was checked as candidate for being at attached property. Task-number: QTCREATORBUG-18707 Change-Id: I6b1b569bc1766325decbc5d100c16a4e0dc3634f Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Merge remote-tracking branch 'origin/4.4'Eike Ziller2017-08-151-0/+3
|\ | | | | | | | | | | | | | | | | Conflicts: src/tools/clangbackend/ipcsource/clangiasyncjob.cpp src/tools/clangbackend/ipcsource/clangjobrequest.cpp src/tools/clangbackend/ipcsource/clangjobrequest.h Change-Id: Ib8602530663813ade418f995dfd2a736908cfe75
| * QmlJs: fix false positives for propertiesMarco Benelli2017-08-101-0/+3
| | | | | | | | | | | | | | | | Resolve references while looking up for object members. Task-number: QTCREATORBUG-18362 Change-Id: I9d2b2457fb3488c723a41e4e8ba1fc0ea9fe800f Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | QmlJs: Initialize membersRobert Loehning2017-08-111-1/+1
|/ | | | | Change-Id: I15a3ec660608266595a8b7a12b59016cc28331af Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Merge remote-tracking branch 'origin/4.3' into masterOrgad Shaneh2017-05-231-1/+0
|\ | | | | | | Change-Id: I01ab8c85ea3372b6dce4142ddb9cf92d903ffca6
| * QmlJS: Allow Loaders in ui.qml filesThomas Hartmann2017-05-221-1/+0
| | | | | | | | | | | | | | | | Loader are working in the designer and we will add more support for them in the future. Change-Id: Ied62d65b0eb9933b44a7833ccafcb934d4ae6fba Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | QmlJs: use initilizer_lists for pairsTim Jenssen2017-04-271-3/+3
| | | | | | | | | | Change-Id: I0386d57ad3549814ab197c4e24549705e061c95a Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | Merge remote-tracking branch 'origin/4.3'Eike Ziller2017-04-191-3/+2
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: src/plugins/genericprojectmanager/genericproject.cpp src/plugins/genericprojectmanager/genericproject.h src/plugins/genericprojectmanager/genericprojectnodes.cpp src/plugins/genericprojectmanager/genericprojectnodes.h Change-Id: Ie0c870f68c8d200a75489b75860987655b2f6175
| * Use QFileInfo::exists(...) which is faster that QFileInfo(..).existsMontel Laurent2017-04-141-1/+1
| | | | | | | | | | Change-Id: I0d2e61d84c74e60ef4f54074a4ca00f2d0835562 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
| * QmlDesigner: Allow Dialog in .ui.qml filesThomas Hartmann2017-03-311-2/+1
| | | | | | | | | | | | | | | | The support is not perfect, but I see no reason to excplitly not allow it. Change-Id: I6b1d825acde156cc7b50160060e89bb964667ab8 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | QmlJs: sync qmljs parserMarco Benelli2017-03-231-3/+2
|/ | | | | | | | | | The last version of the grammar contains some constructs that the code model needs to know. Task-number: QTCREATORBUG-17842 Change-Id: I6250f96431acc05b19f3fd1b6cc268a07485cf0f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Merge remote-tracking branch 'origin/4.2' into 4.3Orgad Shaneh2017-03-141-0/+1
|\ | | | | | | Change-Id: I4931dcc81be872d7712e67123e94d15ee696459f
| * QRegExp include cleanupSamuel Gaist2017-03-131-0/+1
| | | | | | | | | | | | | | This patch adds the missing include statements for QRegExp. Change-Id: Ibb03b929940adb84ae190b5090cb6b88653cc14c Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | Remove spaces in initializer listsTim Jenssen2017-02-221-49/+49
| | | | | | | | | | | | | | Format initializer lists code style like. Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013 Reviewed-by: hjk <hjk@qt.io>
* | QmlDesigner: Allow qsTranslate in .ui.qml filesThomas Hartmann2017-02-131-3/+6
|/ | | | | | | | Also adding the NoOp functions. They can be used in models. Task-number: QTCREATORBUG-17714 Change-Id: Ide9745613850580f0098d2fa7f8889809d18bd45 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlJSCheck: Allow Math. function in ui.qml filesThomas Hartmann2016-11-171-2/+19
| | | | | | | | | The Math. function like Math.max() are quite useful to define more complex layouts. Therefore we allow them. Change-Id: Ia95dcbcc1b8e96c117650dc8643da4a9de0ecdba Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* QMlJSCheck: Add missed types of State changesDmitry V. Tchoomak2016-11-091-0/+2
| | | | | Change-Id: I08ed689dfa92477e35961b7b0b1d407f0c974979 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
* QmlJSCheck: Adding more unsupported in designer typesThomas Hartmann2016-11-081-14/+23
| | | | | | | Using initializer lists looks much better. Change-Id: I314d846a9d383dbda432cd67010d79b492f40915 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Allow JavaScrip blocks in Connections in .ui.qmlThomas Hartmann2016-10-281-1/+6
| | | | | | | Inside a Connections item JavaScript blocks should be allowed. Change-Id: Ia6a08fc575a72980bd53a32249bf302b7a426266 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* QmlJSCheck: Add error for ambiguous idsThomas Hartmann2016-10-261-0/+43
| | | | | | | | Certain ids can be ambiguous and have name clashes with properties. Those ids are not supported in the designer. Change-Id: Ida293d24611c467df6ef813a541e8abfc06b51cb Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: A StateChangeScript can be the child of a StateThomas Hartmann2016-07-011-1/+2
| | | | | | | I found this while testing our demos. Change-Id: I575e1d2f487a2ba137ac8181f4980c30b171f726 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>