| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
We seem to be checking grouped properties twice by endVisit(UiObjectBinding*) and endVisit(UiObjectDefinition*).
So the UiObjectBinding variant is removed here as this gets run before all type information is available.
Change-Id: Idfe23869792f787df6109cde3b6bc1d96cce3dc3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
It's easy to mess this up when you transform your signal handlers into
functions.
Task-number: QTBUG-89943
Pick-to: 6.1
Change-Id: If35be2f6828a0e19aada19abb41d8135b0c6ab45
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This collides with injected signal parameters. qmlcachegen cannot tell
those cases apart.
[ChangeLog][QML][Important Behavior Changes] QML warns about JavaScript
variables being used before their declaration now. This is almost always
a mistake. It is particularly dangerous in the presence of injected
signal parameters because qmlcachegen cannot identify a name collision
between an injected signal parameter and a variable being used before
its declaration. It therefore miscompiles such code. You can turn off
the deprecation warning using the "qt.qml.compiler" logging category.
Pick-to: 6.1
Task-number: QTBUG-89943
Change-Id: I8a9424ca8c6edd562402fe5c560ba7e8344b5585
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
The "2" is meaningless and there is a better name available now.
Task-number: QTBUG-85064
Change-Id: I65d26b06712ed7dcf2825f16dffaa6060dd86985
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.0
Change-Id: Ie04ad4221b25628687c2575facf90488b83d21bf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Before, we would prepend the namespace to the name, but then continue
right away, never checking the new name.
Change-Id: If90db7d33536fb4b549321c2d6b677040605b6f0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
| |
Change-Id: Ie52ce15b7fa960ce84a6d17a21a0e307a38c726e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
Fixes: QTBUG-90513
Pick-to: 6.0
Change-Id: Ic39e72d6df20be30c61123a7f8091d70dbc2d924
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>
|
|
|
|
|
|
|
| |
Fixes: QTBUG-90448
Change-Id: I5fb6b3d9223ae95ca7e039c5b9139ed086052c29
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
And do not choke completely on extended.
Task-number: QTBUG-90448
Change-Id: I4ac5742ec70f5ba1ed1403be444d9cc7229830c2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Remove all qmake project files, except for examples which are used to
test that qmake continues to work.
Change-Id: Ic4abb72dc2dcd75df7a797c56056b6b3c5fe62ac
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
Now that we have a module describing the qmltypes format, we can run
qmllint on qmltypes files.
Change-Id: I23339e52b5081ecb6a2c3b127078389a2b8faab0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
| |
Change-Id: Ica93a3e3fb0eb99be1498f1fcb94b09c113272d7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
Output the command line, exit status, exit code, stderr and stdout.
Change-Id: I81a813bc44b7caf4c25d9097e8fbcbc3295ac6ec
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>
|
|
|
|
|
|
|
| |
So far we've just ignored them.
Change-Id: I2ca522ef825a341a3f4bf1c2a42fb0376180cdda
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I9394dd721eac3e0b76fbedb6b2fca6f45da48383
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
In Qt6 we don't want those anymore, but it's easy enough to support them
for now.
Task-number: QTBUG-87164
Change-Id: I2a6cd1dd99f772d132f71575c9c5f4538a3dd0f0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
And produce a warning when doing so.
Task-number: QTBUG-87164
Change-Id: I75eab97a37af1268a310e88e3ac6a625127a7f62
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
... and produce a warning when encountering the default.
This shows us that the qmake build omits some typeinfo entries from
common modules. Add those.
Change-Id: I1c7e87e8a54ef24a6076090e6051eb1c03c09b2a
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>
|
|
|
|
|
|
|
|
|
| |
This is in fact invalid QML. The assignment shouldn't be accepted but
qmllint cannot see that, yet.
Change-Id: Ifcb2f01edaf10ada5ce4d762726c51af3b4f5087
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
This bit of code has never fulfilled any discernable function. Enum
access is done elsewhere. Add a test case to prove that access to enums
from QtQml's plugins.qmltypes still works.
Change-Id: I62fd6c1ec748c88205aa20367ee06d7a33502fa1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Replace more QLibaryInfo::location with QLibraryInfo::path
Replace old event accessors APIs, including relevant comments.
Change-Id: Ie205fc93b6e1c0dfb3dca9100fbde417ab68fc9f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
| |
Fixes: QTBUG-86183
Change-Id: I4809cb5a408eb4e668f802cf0d7b7a872d1ed4b7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
| |
FindWarningVisitor for signal add property "signal" + "Changed",
so it was impossible find "singal" and "onSingal" names.
Fixes: QTBUG-83793
Change-Id: I5a62211f413f543fdb6bf00e0ab921561d7a9643
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
Fixes: QTBUG-85185
Fixes: QTBUG-84036
Change-Id: If0989a85df93903fee6cb146a515cd362160ff49
Reviewed-by: Evgeniy Dushistov <dushistov@mail.ru>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't want to pick the dependencies from the qmltypes files. Rather,
parse them directly from the qmldir. Do process versions, too.
Also, import explicitly given qmltypes files only once, and don't expose
QML types from dependencies as actual types. Hide them behind an
inaccessible prefix.
For the inaccessible prefix to work, we need to import the C++ class
names without the prefix. The prefix doesn't make sense for C++ names
anyway.
In addition, properly process version-less imports.
Change-Id: If582ad271db35351d219332c319571a814628fe0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I changed the strategy of traverse via related types.
Before:
traversal happens only via linked list type -> type->superClass
After:
traversal via binary tree formed by attachedType and superClass
I use pre-order strategy, current type, then all attached types,
then all super classes
Fixes: QTBUG-84861
Change-Id: I4a8fce869bc541de6900514d29575174d2753f02
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
Fixes: QTBUG-84300
Change-Id: I1a9db060cdeb7c4ec10deedab5141a06245a55b2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
| |
Fixes: QTBUG-83796
Change-Id: I635bbfd98cf7be8418b454626ba7725e92b71c2c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Previously, type assertions were ignored. The test case didn't fail
because simple type casts were automatically detected when the derived
objects were instantiated and assigned to base type properties.
Pick-to: 5.15
Change-Id: I437e77ff38b7d570451cf27ca84e9897b519413f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
| |
Fixes: QTBUG-83915
Change-Id: I26731ebcec6be46602b6acc7562c65b1c9f3e43a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
It should be a file.
Change-Id: I52f4ebcf8bdd8ddd1fedd66ceffe9a060139c1d9
Fixes: QTBUG-83861
Pick-to: 5.15
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
Enables all warnings by default and makes it possible to toggle
individual ones using command line flags.
Change-Id: Ie55f32f646fd9422313977969f9f00b59ee9ad99
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
| |
Fixes: QTBUG-83684
Change-Id: If15a9498ae223dccfbafe88b14453a4b180247d9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
| |
We want to read qmltypes files and analyze scopes also from other tools.
Furthermore, restructure the shared directory, so that each tool only
includes what it needs.
Change-Id: I96a2dcc8b1c5fac613592fb1867bf51fa5ef3a6e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\
| |
| |
| | |
Change-Id: I6f320ea43b5837444226228c118e57c4bda8702a
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously we would run into infinite loops on those. Mind that qmllint
will reject a file called Window.qml that imports QtQuick.Window and
then instantiates a Window {}. Such a thing is bad style.
Task-number: QTBUG-82817
Change-Id: I6db82ca1794c3020dcb7d7e837fe44f72bca5029
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|