| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
In the AST, the type always has a name.
Change-Id: Ifc299573132b9edeb4c0b96054a101d95332236a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit c6c37d12633cc9fc3be1a1aa8e18d1013f3ab2d9)
|
|
|
|
|
|
|
|
|
| |
Previously, all attached property scopes were just ignored.
Task-number: QTBUG-84369
Change-Id: I324becf92402eacea9d150e6e51359edae562dde
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit f34ecc8f99522b69d1aaa3d5d233add9ed9b6da9)
|
|
|
|
|
|
|
|
|
|
|
| |
"on" assignments are assignments to the default property, with the
property given interpreted as the target for the inner object.
Change-Id: Ia93a171f759964d2c00d6c0293a5434f588123af
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 67c8afff346eae27c6fb833661d179326dd8b153)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
| |
If we don't return there, the newly imported script is promptly
overwritten by an invalid module.
Change-Id: I788a7275e2c190a20c176da35f5c76ac9f6ad02b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
All those types are properly defined in the qmltypes files now. We just
need to search the enumerations the same way as methods and properties
in order to find everything.
Also, deduplicate the code that resolves properties, methods, and enums
by using a common template for iterating the scopes.
Change-Id: I0bf1423974d0ec8f602ecd0342522b3e981a8586
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
That is wrong. The context does not contain such objects. Instead, mark
the names as namespaces in the imports by giving them an empty type.
Change-Id: Ie9d0bba592863878d2220cee59be369ba2534f17
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
All non-C++ scopes are composite. Now that we can return the global
scope, when parsing a script, this matters.
Change-Id: I6c9a17bdd3acf80fce728b1df5c3d9e66035bd33
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
There is no reason to duplicate the code for retrieving method
signatures 3 times over. As an added benefit, the types on those methods
are resolved now.
Change-Id: I2f9681911b938c4a260b6593ab49e9cc5098c546
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to resolve the types for QML elements in two passes because only
after finishing the parsing we have the QML-declared methods and
properties available. We already need the base type before, though.
Also, there can be multiple methods of the same name. We need API to
access them.
It also turns out that the internal name of the "var" type has to be
QVariant in order to match reality. "var" properties and unnamed
arguments to JS functions are implemented as QVariant.
Change-Id: I541f11e96db72d832f4e4443d3a5d31079a56575
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When parsing QML files, we need to keep the enum values around as this
is the only place where we can find them (without parsing the same file
again, that is). With C++ types we don't strictly need them as they are
also available from the C++ header, but if the qmltypes file is nice
enough to provide them, we can use them. (Which will be for types that
are not actually C++ types, but rather types produced by registering a
QML file with qmlRegisterType()).
Change-Id: Ibcc93b30e523a00e1eeb80029943c48b83d0e1b5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
| |
Change-Id: Ibac4dd7641a89b686bee63cf974b2257a35631a2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
This is in line with what the IR does.
Change-Id: I9808d6e070a19e749e43c4abf612556485eb080b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
This is necessary to identify the available QML and JS scopes for the
binding, and to add any identifiers found there.
Change-Id: Ic966e7817ccd1fdc064dd433d16fa6c42c9110cc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
This way we can analyze the left hand part of things like
"anchors.fill: parent" in qmllint.
Change-Id: I0f58312566c3d5062e0fb301c2bad908ab8b8cbb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we would mix them up on importExportedNames(), which was
also misnamed. Now we keep them in their proper place in the scope
hierarchy, so that we can identify which scope a property came from.
Exceptions are the qmllint-specific treatment of parent properties and
Connections elements.
Change-Id: I7c012388b16c83439d6f2de2e83fac0da4940d30
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
So far we've just ignored them.
Change-Id: I2ca522ef825a341a3f4bf1c2a42fb0376180cdda
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
| |
Change-Id: I8c52efc752fbeae4485d7cc2112d615707e2afd1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
And refactor QQmlJSMetaProperty to use setters rather than a gigantic
constructor. Also, notice that we don't have to construct the same
property twice just to update its type.
Change-Id: Ia6c195fa7088f6ecdff868daae17d4284c1edb22
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
| |
Change-Id: Ic0aeb152acb0d90d15cc48a55c0ad5b15a60a6eb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
Most of the logic in findwarnings.cpp applies also to imported files and
should live in the base class.
Change-Id: I65f326f50a8bfab0dff4b5b31f7bee7300b20704
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
They are both pretty much doing the same thing, except that the import
visitor is not as thorough. We need the full analysis in QtQmlCompiler,
so we successively move the code over.
Change-Id: If7fb47f88165fd8b61f4ccc408ccfbb7dad533e6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
When importing a directory we most likely don't need all of the files in
the directory. Therefore we now parse them only when they are accessed.
This speeds up the execution and will allow us to process imports
recursively without running into infinite recursion.
Change-Id: I0c79313de792249e6bb86144b5014a7787dbdc5b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
We can use QQmlJS::DiagnosticMessage to carry message, type, and
location.
Change-Id: I3868bc8035b4da13efad0d1b7d2f8dfeff1ef234
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
We need to make this a general import visitor.
Change-Id: I735378fc9139cb4891f8b113d86395df856fb4e9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|