| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the assumption was that each object could only have a single
extension object. As proven by the new qqmllanguage test this is not the
case. Each registered object in the type hierarchy can have its own
extension. Therefore, adjust the algorithms that generate qmltypes and
iterate the extension objects when analyzing them.
This leads us to the realization that anonymous types can in fact
meaningfully carry extensions and implement interfaces. Adapt
qmltyperegistrar accordingly.
For the test to compile, however, we need to realize that the class
declaring interfaces needs to befriend all potential subclass's
QmlInterface structs. Fix that, too. The rabbit hole went deep.
Change-Id: Ia451897e927e03b95c3062e829edf1dfcd216613
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>
|
|
|
|
|
|
| |
Change-Id: Idb29a7483b813ed00849c13ef1324c7e931400de
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
Fixes: QTBUG-90448
Change-Id: I5fb6b3d9223ae95ca7e039c5b9139ed086052c29
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
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>
|
|
|
|
|
| |
Change-Id: Ibac4dd7641a89b686bee63cf974b2257a35631a2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
You get to write QML_SEQUENTIAL_CONTAINER(value_type) now, and
qmltyperegistrar will generate a sensible registration call from that.
A registration might look like this:
struct MyStringListForeign
{
Q_GADGET
QML_ANONYMOUS
QML_SEQUENTIAL_CONTAINER(QString)
QML_FOREIGN(MyStringList)
QML_ADDED_IN_VERSION(3, 1)
};
It's unfortunate that we need to use a metaobject to transfer all of
this information, but there is no other sensible way.
Transform the containers defined in qv4sequenceobject.cpp to use the new
style, and move them out of the builtins, into QtQml. Recognize that
only one of them was ever tested, and add tests for the rest.
Task-number: QTBUG-82443
Change-Id: I3a30f9e27266bb575eea26c5daf5dad1ec461cc5
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>
|
|
|
|
|
|
|
|
|
| |
Instead, output a warning if the revision doesn't match the version. We
want to get rid of generic version/revision matching. To this end, add a
way to retrieve the version from an export.
Change-Id: Ie887103eba910f14e49faa684ac559cc72cab199
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>
|
|
|
|
|
|
|
|
| |
They don't begin with 'Q' and they are not very useful outside of
QQmlJSScope.
Change-Id: I3363ac4d29be7a9cb5c9f7f3af1727c99e886825
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
As a Qt module, QmlCompiler's classes should live in the Qt namespace.
Change-Id: I3138812c288979fe7cff316dd9b63213bd6dfd05
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
Those are specific to QML/JS.
Change-Id: I45a5d4eb6c53bd5ca4026e042af83c4afaa4953c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
That is a better name.
Change-Id: I34a6867692a236dd16ed8e3a68866f994eab02d2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|