| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Change-Id: Ie04ad4221b25628687c2575facf90488b83d21bf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 5fb34b67b810ca284c216009925f4f38220c4510)
|
|
|
|
|
|
|
| |
Fixes: QTBUG-90513
Change-Id: Ic39e72d6df20be30c61123a7f8091d70dbc2d924
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 9b407b68d1fc0abe08091aa7ca007fbf0f03fb89)
|
|
|
|
|
| |
Change-Id: Ibac4dd7641a89b686bee63cf974b2257a35631a2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
The identifier check might yet yield more information.
Change-Id: I96f700acf257736fea7e9c2023b9e8797f702f7c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Maximilian Goldstein <max.goldstein@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>
|
|
|
|
|
|
| |
Change-Id: Ia661141095a865191945f41bad91429ef952e16c
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
| |
Change-Id: I5898402604fe29731dc518d42a441ff852706af3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
| |
Change-Id: I9f3a4a6b6c7a2fbfca0a572209f398a23c26b37b
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>
|
|
|
|
|
|
|
|
|
| |
I can't think of a scenario where this actually makes sense and none of
the autotests exercise it.
Change-Id: I6361d38e02f1cdac60ee5a4e1b8287491c3b05e6
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
Refactor the "prefixed message" mechanism into ColorOutput.
Change-Id: Ie982e641771f3367406f48a8bcfd2bd3da122b16
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
Modify special case locations to use the new API as well.
Task-number: QTBUG-86815
Change-Id: I3b964e3baf0cc7040830156dac30358ea1152801
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
importing a file and importing a directory are really quite different
things and the code paths inside the function were completely separate.
We also don't have to create a map of ImportedTypes if we are only going
to return a single one.
Change-Id: Ifbb0caa70e9272dfde2d9f1cf5ed1b102e02f5cc
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>
|
|
|
|
|
|
|
| |
The names should begin with a common prefix.
Change-Id: Ibd832ebe7a778c7af8ee3b75253e04491ded28be
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
Add an extra 'Q' for consistency.
Change-Id: I81324f3b6e4d26a29f3bcc40b03abfa137292ea0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
Add an extra 'Q' for consistency.
Change-Id: Idd34e0c898c9a7ac70b1ec3856a8af6829ec6fb7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
The class names should start with a common prefix.
Change-Id: I645ef476f8493d38c2f4c5241d4a2903543f09e8
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>
|
|
|
|
|
|
|
|
| |
Move all the code from tools/shared into src/qmlcompiler and build a
static library from it so that we can re-use it in external tools.
Change-Id: I7c8d8e59063dc7c711f4072f103a01095e6f5997
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
What we need there is a proper type inference. This should be added
separately. For now, keep the member access chains local in qmllint and
don't pollute ScopeTree with them.
Change-Id: I9f50aa4e54b285bd93e7bd4cd17797509df0c168
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
Rather, immediately output the warnings when we encounter them.
Change-Id: I4bd1a5491a47cb0232bfdd4e325f8f122593aa39
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
The specifics of how to warn about the injected identifiers are moved
out of ScopeTree as that is not related to the structure of the scopes.
Change-Id: I26418c3fa492da8339abf045a4034a8464b7bbb8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
QTypeRevision does all we need there.
Change-Id: Ib27ae2d58167a7a45fac31262a45e387d047af89
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
This is not a property of the ScopeTree itself, but rather a property of
how qmllint sets up its scopes.
Change-Id: Ifb7c0f1f841046a6ae68e246fbd706f67bedb2af
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
We don't use them anymore. Now we can also make all the ScopeTrees const
again as we don't need to modify them anymore after importing.
Change-Id: I3ece767f4f62f06cb0640f1f191eb8d98400717c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
The C++ names are an implementation detail of the importer, and qmllint
has no business messing with them. All the types are supplied as
ScopeTree by the importer now.
Change-Id: I3ef2b5da1dc19f95c7f2a5d80fa1297ba10bef8f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
We don't need to expose them anymore.
Change-Id: Ibb25f688459972f718f9a051fbb7265c7e5b5f92
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
builtins.qmltypes are imported separately now. Any other bare qmltypes
files without qmldir should be specified explicitly. If none are
specified, qmllint looks in the current directory for qmltypes files,
not in all possible import paths. This is still somewhat weird, but
admittedly it's handy for qmltypes files generated for application
binaries. For the same reason, we unconditionally include the current
directory in the list of default import paths. Previously this was done
if no explicit qmltypes files were specified, which makes little sense.
Change-Id: Iaa56f8b40b3ec3045f55928251d7efea5616d23b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
It was only used to make paths passed to importFileOrDirectory absolute.
We can do that before passing them.
Change-Id: I0798d38080596fc6eb314259e81702b81a7743dd
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
We want to re-use this logic in other places.
Change-Id: I63cbee86a83265ddd241a4fae9ce8c48f38b5f18
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
We need to check for the baseTypeName, not for the internalName. Also,
this is not really the scope's business but a property of how qmllint
sets up its scopes.
Task-number: QTBUG-87116
Change-Id: I8f0e558a4a5861164c6e85f90e3d88e469ea0769
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Evgeniy Dushistov <dushistov@mail.ru>
|
|
|
|
|
|
|
|
|
|
| |
We cannot handle those, yet. Add tests that prove correct grouped
properties pass and incorrect ones are expected to fail at causing
qmllint to fail for now.
Task-number: QTBUG-87116
Change-Id: I0aeed15d262e2c6226e27d5d92890c5385a38936
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
There was one place where it was written in lower case.
Change-Id: Id953fa6c260502ab5bca8cfa061c817bb5a70581
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
Imports are not transitive. qmllint gets this wrong so far. Fixing it
reveals two tests where we use types we haven't imported. Import the
relevant modules.
Change-Id: I45f3229468d54137f97d6b699f3a98a1349bc412
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
You cannot use the same name multiple times anyway (for now)
Change-Id: I957340273772a1c5cf0a9da840a305bc8b311e95
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is just wrong. The types are not visible in QML under their C++
names. Indeed, this way we reveal a number of places where we confuse
the names. Fix those in turn.
Furthermore, one of the tests was incorrect. The qmltypes files did not
contain an export entry for one of the types, and therefore the type was
formally anonymous in QML. However, we did access it via its C++ name.
Fix that by exporting the C++ name.
Change-Id: I8dd96334076b90fb174daf5b285d622f96495f56
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
exported names are the names a component intends to export. imported
names are the names the importing component sees, possibly adding a
prefix. C++ names are only used in qmltypes files for non-composite
types.
Change-Id: I843e34f07a026a06931ed76d72a3cce98e3e5552
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
In particular, allow auto and latest versions.
Change-Id: I4a6b26112950d066ae2d8a37dc0e9fa1dec24724
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
It was rarely used and only caused confusion. Use internalName instead.
Change-Id: I196b1d77db04a2cb6e3cd0447d34ce9bae0b9cd5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
... and notice that they are misused everywhere.
Change-Id: I2254993dc5d11e967e7e83c6f0efb37fa17744be
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
| |
Change-Id: I48601019d0e200eae9d52c3a9db45913cdd9d0f8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
This still messes up the association between scopes and imports, but at
least it encapsulates the issue better.
Change-Id: I67239495e61ee10d18e6c4b3e837560a42650710
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|