| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
We want to proactively fill in all the types when constructing the
ScopeTree so that we don't have to carry an undue number of imports
around.
Change-Id: I209d88568434c36073c11216dcd052babe5e3dae
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
| |
Change-Id: I3e46a62595bfc05cdf9ee4233a27cd744b080ab9
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-86815
Change-Id: I834513b93cf495ff9075d4cd541ed425e2ccbc15
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
| |
These are needed for qmake projects.
Fixes: QTBUG-86802
Task-number: QTBUG-86498
Change-Id: I09c05a358fa580a3a9eab002c6ada42ad70e999c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Since Qt 5 series include those modules QtQuick.Controls.xxx.Impl inside
QtQuick.Controls.xxx, we shouldn't add them to the dependencies list.
This also will silence androiddeployqt warning about invalid path
for these modules.
Pick-to: 5.15
Change-Id: Ic8c8aa1248b170ab1d455484effb38d24a1b4d35
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
Replace QLibaryInfo::location with QLibraryInfo::path, and remove usage of
Qt::AA_EnableHighDpiScaling, which doesn't have any effect anymore.
Change-Id: I347e8a83e0f4c2b4405f2512e569ad3234f05a98
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
|
|
|
|
|
| |
Pick-to: 5.15
Change-Id: I3ba8a4cd683df3309dd6df31b1fd426a0875f8fa
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
| |
Change-Id: Ibfb50fdcbb51ba93d6e5d11f9e8ce0e7b3bfde79
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
|
|
|
|
|
|
| |
Taks-number: QTBUG-86234
Change-Id: I4c945edecdbe55bc5587c18599d49dfb82ade1eb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
Use the new qt_internal_add_app function.
Task-number: QTBUG-85757
Change-Id: I455443a29511c809d2ad87073b2ae685fdbf27ae
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
| |
Change-Id: I91685ac4cf1f5186d58252587fb8c7d7375372b2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
| |
Fixes: QTBUG-86183
Change-Id: I4809cb5a408eb4e668f802cf0d7b7a872d1ed4b7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
| |
Fixes: QTBUG-86060
Change-Id: I7a191c451793bf4e1f6a2bd02ceb36b5957136c2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
Don't alternate between paths and URIs if we only need the URIs, and
don't rely on casting from ASCII to QString or QChar.
Change-Id: I4c206d5ff488939d5d2d78a3694d8eaf54ec5ec1
Reviewed-by: Fabian Kosmale <fabian.kosmale@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Qt 5 we added a QmlImportScanner package that provided a
qt5_import_qml_plugins() function. Calling it with a target ensured
running qmlimportscanner to find and link necessary qml static plugins
for an application to work.
This is the initial port of that to Qt 6, with a few differences.
It introduces 2 function names, the version-less one and qt6_ prefixed
one, qt_import_qml_plugins and qt6_import_qml_plugins.
Implementation notes.
In Qt 5 we figured out what link flags to pass by parsing the plugin
prl files.
In Qt 6, CMake can generate appropriate plugin targets with
dependencies, as well as Config files that can look for the dependent
packages. Use that information for finding the dependencies and linking.
Note this relies on the assumption that find_package(Qt6Qml) will already
include all available Qml plugin Config files, so that the
targets exist in scope by the time qt_import_qml_plugins is called and
links against those targets.
The automatic inclusion is handled by a change in qtbase.
In Qt 5 the function was available as part of QmlImportScanner
package. In Qt 6 the function is moved to QmlMacros, so it's enough to
find_package(Qt6Qml) to use it.
A dummy QmlImportScanner package is provided for backwards
compatibility, that simply finds the Qml package.
Another change is to make the resource name added by
qt6_target_qml_files unique (include the target name), because
qmlcachegen generates a cpp file with a static initializer function
name that includes the resource name. This caused duplicate symbol
errors when linking more than one qtquickcontrols2 style plugin into
an application when the resource name was not unique.
There are a couple of TODOs left:
- Figure out if it's possible to automatically call
qt_import_qml_plugins for applications that link against Qml.
Perhaps using our hacky scope finalizers.
- Figure out how to handle scanning of resources.
Task-number: QTBUG-85961
Task-number: QTBUG-85994
Change-Id: I42f61e4acc6f74a3cdc030dba9e41ce789bc28f6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
| |
We want to re-use this in other tools.
Change-Id: I2a8cd104d54c1fa9b2898213b0b9e09719e42bca
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
Adjust to the lastest changes in QList and QString.
Change-Id: I216b2746a3305222a21c5aead3aec6106ac1f035
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
We need the qt_add_tool changes to successfully configure qemu builds.
The rest of the changes are just to be in sync with the .pro files.
Change-Id: I7bcc08ac58f57a5761aedef09761428c55235289
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I85897930980bb98ba9f968cdf70696547493b1d5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This gives us a reliable way to parse imports and versions. Apparently
we can also have multiple classname entries in the same qmldir file.
Reflect that in the parser.
Also, drop the version field from the output. Nobody uses it and
maintaining it while allowing partial, missing and auto versions would
be rather difficult.
Fixes: QTBUG-85304
Change-Id: Iab89a6d505a3c58174e623f02f0418899cb5fa2f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
Tolerate dependencies without version and don't write them into the
output anymore. No one should read them as the same info has to be
available from the associated qmldir files.
Change-Id: I5e4cd93c83cb5e874a8a6e1467461d081b1a089c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Increment all the version numbers. Replace
qtquick_compiler_add_resources with a warning and a call to
qt6_add_resources.
Task-number: QTBUG-85190
Change-Id: Ifed5449ab4d6312a57add870eee13175872146db
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Empty blocks were often not handled properly.
(i.e. in if, for and while blocks)
Fixes: QTBUG-85321
Pick-to: 5.15
Change-Id: I4035dd239a095814362e0aec142b387dc113f282
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
| |
Fixes: QTBUG-85317
Pick-to: 5.15
Change-Id: I52589b681690a55f7bba7d7d9c675dc22ffa1587
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Some bindings may turn multiline while formatting.
This change makes sure this is handled properly.
Fixes: QTBUG-85289
Pick-to: 5.15
Change-Id: I6df98b926d69a23480003c3d9705bc34c3dd0d5d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
There are valid reasons not to compile some resources with qmlcachegen.
Pick-to: 5.15
Fixes: QTBUG-85243
Change-Id: I9a1233864ed5dda0c264e61db596a9d8c80ea1f3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
This is required to remove the ; from the macro with Qt 6.
Task-number: QTBUG-82978
Change-Id: Iead53d18fd790fb2d870d80ef2db79666f0d2392
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|