| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
When using refs as loop variables, the clang compiler complains (with
default settings). This prevents that. Note that QJsonValueRef is used
"behind the scenes", which makes this iteration method correct.
Change-Id: I5a5f58ca8ad3887bce2009231cbae5a57c107697
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@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>
|
|
|
|
|
|
| |
Task-number: QTBUG-87037
Change-Id: I1cb6cd15fbb5fe08a0280ed83d01fc1b49249524
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
|
|
|
|
|
|
|
|
| |
We need to re-use them. Also, provide a way to insert AOT compiled
functions into the C++ code.
Change-Id: I7b0d13cb307e8f979745f096a9614f087d135f68
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
This enables us to use the same generateloader.cpp for qmlcachegen and
any replacement that actually produces AOT compiled functions.
Change-Id: I12fe81236e4ef16a627729c644d54b6c171b3860
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
We need to be able to generate the loader code from multiple places.
Change-Id: I9e04fd3583b535bc5f7d5fb293cb61309c1e199a
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>
|
|
|
|
|
|
|
|
| |
For backwards compatibility, a replacement for qmlcachegen will need to
provide the same functionality.
Change-Id: I22664230ea636d384190122223d15819ebee930c
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>
|
|
|
|
|
|
|
|
|
|
| |
This is useful for modules that select their imports at runtime using
qmlRegisterModuleImport(). We can list all possible variants as optional
imports so that tools can see what types might be available.
Task-number: QTBUG-87130
Change-Id: I8a37bdde79aef3619fd1f05e5ea6781d521afa88
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
| |
Fixes: QTBUG-87179
Change-Id: Ieb7dffab59923bcb2ce8745c499eff7de44134b1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
| |
Fixes: QTBUG-87181
Change-Id: Ic8b7f69b4f9faf907ec75f27b689ba3686eb013f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
Fixes: QTBUG-87222
Pick-to: 5.15
Change-Id: If1da02d503041009b82651e1087fb4a1bdd79d59
Reviewed-by: Ulf Hermann <ulf.hermann@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>
|
|
|
|
|
|
|
| |
Fixes: QTBUG-86980
Pick-to: 5.15
Change-Id: Id27350821051709894c7645a362cfdf7ce0d279c
Reviewed-by: Ulf Hermann <ulf.hermann@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>
|
|
|
|
|
|
|
| |
Fixes: QTBUG-86979
Pick-to: 5.15
Change-Id: Ie8863bc2ecf75a9dd8e4af5e96e48c30e7acbacd
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 names should start with a common prefix.
Change-Id: Ib2cc247d459d78de5f0a8ea0be73b89429154475
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
The file class names should start with a common prefix.
Change-Id: I5e014c103668a1bc73d359b00a1dda33e5637a79
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>
|