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>
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>
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>
They are passively supported and we plan better support in the future.
Change-Id: I22520335ae3dba5804ec4c8902624b4afe4254a3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The reasoning in 1b4766e26c 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>
This fixes a false positive error message.
Task-number: QTCREATORBUG-22599
Change-Id: I54104857982873baaa092ad936586c3d245ce720
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
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>
- use nullptr instead of 0
- remove all QLatin*
- use initializer for QStringLists
Change-Id: I62db000e2644d1d2a2c1246e70e829e37d36f2f3
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
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>
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>
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>
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>
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>
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>
Resolve references while looking up for object members.
Task-number: QTCREATORBUG-18362
Change-Id: I9d2b2457fb3488c723a41e4e8ba1fc0ea9fe800f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
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>
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>
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>
This patch adds the missing include statements for QRegExp.
Change-Id: Ibb03b929940adb84ae190b5090cb6b88653cc14c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
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>
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>
Inside a Connections item JavaScript blocks should be allowed.
Change-Id: Ia6a08fc575a72980bd53a32249bf302b7a426266
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
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>
States can of course contain PropertyChanges.
Change-Id: Ie78be1db58c6820a49356b1cd70102e10211030b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
For a valid AST id should be never empty.
A crash has been reported. though. Most likely the parser
injected a UiQualifiedId for an incomplete document.
Change-Id: Id2f1b25cf9d78982524d7aaff2b43210e1ae2a3b
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>