aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlplugindump
Commit message (Collapse)AuthorAgeFilesLines
* qmlplugindump: Fix overload ambiguityMaximilian Goldstein2021-02-081-5/+6
| | | | | | | | Fixes: QTBUG-89955 Change-Id: I89ce8a146c0ce07c8e308783f79677575458c71c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 40eaa9509b1c2e430b7617e1b42aa66214ad80df) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Standardize QJsonArray iterationDavid Skoland2020-10-281-1/+1
| | | | | | | | | 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>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-10-062-6/+6
| | | | | | | | 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>
* QmlCompiler: Rename QmlStreamWriterUlf Hermann2020-10-054-8/+8
| | | | | | | The names should start with a common prefix. Change-Id: Ib2cc247d459d78de5f0a8ea0be73b89429154475 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Long live libQtQmlCompiler!Ulf Hermann2020-10-054-8/+11
| | | | | | | | 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>
* CMake: Regenerate projectsAlexandru Croitor2020-07-092-6/+8
| | | | | | | | | 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>
* qmlplugindump: Fix handling of dependenciesUlf Hermann2020-07-081-58/+61
| | | | | | | | | 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>
* CMake: Regenerate qtdeclarative/toolsAlexandru Croitor2020-05-292-0/+2
| | | | | | | | Includes - A bunch of TARGET_DESCRIPTION Change-Id: I6acfe05187afbdd45cf7e1bf8634f1554a51c791 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Clean up registration of QEasingCurveUlf Hermann2020-05-191-14/+0
| | | | | | | | | | | | | | | | We don't need to register the Type enum for both QtQml and QtQuick. QtQml is enough. Removing this makes the whole manual value type registration obsolete. Furthermore, we want QEasingCurve as QML_FOREIGN as we have several classes with properties of that type. To keep it nice and tidy, we make the uppercase-named enum holder class a separate type. Unfortunately, the Type enums differ in one entry: QEasingCurve::BezierSpline is called Easing.Bezier in QML. Therefore, we need to keep the custom enum around. We can change all users in qtdeclarative to use the name from QEasingCurve, though. Change-Id: Ibbc78d8bbf8938e2a8722f8c09833a0c73394c3d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Move qmllint's metatype support to tools/sharedUlf Hermann2020-04-011-5/+5
| | | | | | | | | 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>
* CMake: Update Apple platform defines after rename in qtbaseTor Arne Vestbø2020-03-172-2/+2
| | | | | Change-Id: Ia0a075e3199eab735f9b289873beeb8730ebc47e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Regenerate and adapt to merge from devwip/cmakeAlexandru Croitor2020-03-122-10/+6
| | | | | | Change-Id: If8daa6152a563d4309d7342414780ef75b9f5589 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-03-121-47/+61
|\ | | | | | | | | | | | | | | Conflicts: dependencies.yaml src/qml/qml/qqmlengine.cpp Change-Id: I6a73fd1064286f4a2232de85c2ce7f80452d4641
| * Use QTypeRevision for all versions and revisionsUlf Hermann2020-02-031-47/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In many places we carry major and minor versions or revisions that are loosely coupled to minor versions. As the Qt minor version resets now, we need to handle these things more systematically. In particular, we need to add a "major" part to revisions. QTypeRevision can express the current major/minor pairs more efficiently and can also be used to add a major version to revisions. This change does not change the semantics, yet, but only replaces the types. Change-Id: Ie58ba8114d7e4c6427f0f28716deee71995c0d24 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2020-01-161-10/+1
|\| | | | | | | Change-Id: I0c5b939c70bdb91ccdf7068784308416dcaa5736
| * Adapt to the removal of QObject::staticQtMetaObjectOlivier Goffart2020-01-141-10/+1
| | | | | | | | | | | | | | | | Qt::staticMetaObject should be used instead Change-Id: I1e02884f0b1f07e9c51d065f11bdc51c793b7173 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Post Merge FixesLeander Beernaert2019-11-252-2/+6
| | | | | | | | | | Change-Id: I13bc3aef318d8b497b01c61fcca7760abd96339a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2019-11-254-293/+42
|\| | | | | | | Change-Id: I48b9c2e4f3a75c18470c55f73f2089dc1401de54
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-161-32/+36
| |\ | | | | | | | | | Change-Id: I6e69a235f50472b8f7ac19e133a3c071ea8c4d7a
| | * qmlplugindump: Fix prototype and name for composite typesUlf Hermann2019-10-151-20/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before we would always merge everything up to QObject. That would duplicate entries between types that inherit from the same base class. Also, when the composite type doesn't specify a module (because we just created a component from a plain QML file), use the module URI from our version info. As we're dumping the component we can assume it belongs to the module we're dumping. Change-Id: Icf9a58cfe1165f557ebbf7309251e98a0782dc33 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * qmlplugindump: Drop defaultReachableNamesUlf Hermann2019-10-121-12/+10
| | | | | | | | | | | | | | | | | | | | | They are unused. Change-Id: Id49720bead07e353e448d92a53c2c6aabe265d3a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Add support for semi-automatic QML type registrationsUlf Hermann2019-10-143-261/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can use the new moc JSON output to collect all meta-objects at build time and, for those that include QML element registration meta-data, generate code that automatically registers these types with QML. This eliminates the need to call qmlRegisterType manually. For now this generates free-standing functions (per module) that need to be called manually. This is intended as an intermediate step. Task-number: QTBUG-68796 Change-Id: Ib414eef9757344feee488ebc7388f957b975347f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Regenerate all projects with new CMake API versionAlexandru Croitor2019-11-152-6/+6
| | | | | | | | | | | | | | | | | | Change-Id: Ie0db35f674137c229eaf049616f38f8e818f7092 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Regenerate projectsAlexandru Croitor2019-11-142-8/+2
| | | | | | | | | | | | | | | | | | Change-Id: I38044c382e4d84b5865a19cdd04cc8922bd72a77 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-142-35/+55
|\| | | | | | | | | | | | | | | | | | | | Removed dependencies.yaml because we don't use it yet in wip/cmake. Fixed conflict in qmlcachegen.cpp. Change-Id: Ie1060c737bee1daa85779903598e5b6d5020d922
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-041-27/+47
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/qtquick2/plugins.qmltypes src/quick/items/qquickitemsmodule.cpp Change-Id: I841c65c9c131354788b4f3fcfe3d7ed27be316d5
| | * qmlplugindump: Consistently sort composite typesv5.14.0-beta1Ulf Hermann2019-10-021-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the sorting depended on qHash(QQmlType), which hashes a pointer to QQmlTypePrivate. That was not very useful. Also, the defaultCompositeTypes were only populated when dumping builtins, and only used when dumping regular types. Therefore, whenever they were used, they were empty. We don't have to bother with that. Change-Id: Ibfbfc7e14bee900d617bab58cbe39d05f5fe91c3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * Loosen qmlplugindump's checking of URI and major versionUlf Hermann2019-09-261-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If not given a "--strict" argument, qmlplugindump will ignore the given major version and only check the URI as prefix, not as exact match. This is in line with what qmlplugindump did in version 5.13 and before. Fixes: QTBUG-78745 Change-Id: Ib2803d47e6cb60c797fec8dfaa628278307d4cd4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * qmlplugindump: fix prototypeNameForCompositeFabian Kosmale2019-09-251-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not put the objects we encounter in defaultReachaleNames. Thus, the check in prototypeNameForComposite will fail most of the time. Instead, we now use the same check as in collectReachableMetaObjects (that is, does the type belong to the module). Then, we once again only collect the metaobjects belonging to the module in objectsToMerge, and only dump the relevant properties from there. Fixes: QTBUG-78744 Change-Id: I78cae1e56b6f59e277198f9bcd0d826c4e0978a7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | QQmlStreamWriter: Code cosmeticsUlf Hermann2019-08-301-8/+8
| |/ | | | | | | | | Change-Id: I0be7a3a8177697a4d47526d703329e2e0bb455f7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-10-111-61/+72
|\| | | | | | | Change-Id: I4a91928610f79c8e21a05781953ffa41508c828a
| * qmlplugindump: Handle types reexported by QtQuickFabian Kosmale2019-08-221-61/+72
| | | | | | | | | | | | | | | | | | | | | | | | Now that our own types are not registered with qmlRegisterType<T>() anymore, we can use QQmlType::module to decide whether a type should be included in the qmltypes file. We include types with no module, to support existing user code which still calls qmlRegisterType(). Change-Id: Iee0a132bf5b3ddcdfc222ab4b2d37a1f05b1851d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-07-111-1/+5
|\| | | | | | | Change-Id: I2963c1209316fb6755f572969f368970450d7991
| * Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-041-1/+5
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I20ad6f8a260f387a3b73566a32c35a5772b401a5
| | * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-031-1/+5
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Icd05d016de5b4cf9af5234cb47b5c3fd0f6a053e
| | | * qmlplugindump: dump enums also for composite typesUlf Hermann2019-07-011-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2745d3df4fca77483313c70e5433339c444c7fd4 Fixes: QTBUG-76627 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | | Port the declarative toolsAlexandru Croitor2019-06-082-0/+81
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Also fix up QmlDevTools module to not depend on QtQml, but instead make it include the headers / cpp files as it is done in the qmake project. Change-Id: I240c52d5357db150a7c0c819892fb0a3708ceee4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* / / Move creation and management of singletons to QQmlEnginePrivateRichard Weickelt2019-04-241-3/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Singleton object instances were previously managed by QQmlType::SingletonInstanceInfo and kept in a shared storage. This caused concurrency problems when instantiating singleton instances from different QML engines in different threads. This patch moves the singleton house-keeping infrastructure to QQmlEnginePrivate and makes SingletonInstanceInfo immutable. Singleton objects are stored in a QHash with QQmlType as the key because the qml type id might be 0 for composite singletons. The public API of QQmlType is extended to provide more information about singleton types so that access to SingletonInstanceInfo is not needed. All internal accesses of singleton objects must now take the same code path via QQmlEnginePrivate::singletonInstance<T>() which simplifies overall usage of singletons and scatters less implementation details throughout the code base. Task-number: QTBUG-75007 Change-Id: I13c5fd21cac2eb7291f2cbcf2c2b504f0f51a07c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-131-12/+22
|\| | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4codegen.cpp src/qml/animations/qsequentialanimationgroupjob.cpp Change-Id: I8b76e509fd7c8599d4cef25181d790ee28edab54
| * Fix re-dumping of composite typesKai Koehne2019-03-061-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | Just like with 'normal' types, we don't want to include composite types that were actually part of depending imports. So we need to remove them from the list. This fixes an issue with QtQuick.Controls style plugins, were so far types from QtQuick.Controls 2 imports were re-dumped. Change-Id: Ib099ae9cfba35218cab852d4d260369c2a652727 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * qmlplugindump: Make compositeTypes non-staticKai Koehne2019-03-041-12/+11
| | | | | | | | | | Change-Id: Ia4f35781ed96a347464b5e423bd7446f5a7f6752 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Fix warnings about unused Qt containersSergio Martins2018-11-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | Fixes -Wclazy-unused-non-trivial warnings, in preparation for using gcc/clang's warn_unused attribute in all containers. Maintainers please check if some unused variable isn't hidding an actual bug. Change-Id: I83c5a11aa2328db3dce4c6c402295d86ef297c83 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-011-25/+0
|\| | | | | | | Change-Id: I7a2b9bdb69512b2d52050d829b1b65f4fcd9d99d
| * Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-10-291-25/+0
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/settings/qqmlsettings.cpp src/quick/items/qquickwindow.cpp tools/qmlplugindump/main.cpp Change-Id: I96fedbc773a110374baed79a0b7de92d65df0ed6
| | * qmlplugindump: Remove sigsegv handlerKai Koehne2018-10-111-25/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not safe to use printf and memory allocations in a signal handler. Task-number: QTBUG-70460 Change-Id: I2a4caf302e17992471575bd89faa505a8db4a7e3 Reviewed-by: Marco Benelli <marco.benelli@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | qmlplugindump: Hardcode QtQml and QtQuick import to 2.0Kai Koehne2018-10-171-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | Change 8725f9873deda85 fixed qmlplugindump to always use the current Qt minor version for the Qt Quick and Qt Qml dependencies. Anyhow, this is unnecessary; for the dependencies resolution only the major type is important. Hard-coding the latest import might lead to people unnecessarily updating the plugins.qmltypes. Change-Id: Icc969517f268b775492f2bcc901827de64123bae Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* | qmlplugindump: Properly handle extension typesKai Koehne2018-10-091-78/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extension classes do augment the primary C++ class with additional properties that should be part of the QML type. Anyhow, they should not be visible in the API. The old logic tried to emulate this by making the extension class the actual C++ type, and 'inheriting' from the normal class by setting it in the prototype. Anyhow, this failed for e.g. Qt3D, where there are numerous types sharing the same extension class. Instead, this patch fixes the issue a) hiding the extension class metainformation itself, and b) printing properties of the extension class as part of the main type. In the QMetaObject collection phase, we now traverse the class hierarchy using QQmlType::baseMetaObject instead of QQmlType::metaObject. In the generation phase, we explicitly resolve the extended type, and dump additional properties and "DefaultProperty" information into the main type description. Note that the ExtendedType sets the DefaultProperty independent of the version. Changing this would require either revisioning the defaultProperty, or (again) splitting up the types, which however brings other problems. Task-number: QTBUG-70294 Change-Id: I324469152398a605fae9e5a35b619845444ac4e8 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* | qmlplugindump: Fix calling of qmlimportscanner on WindowsKai Koehne2018-10-091-2/+4
| | | | | | | | | | Change-Id: I16618f0858b3fa878b4255147291c011efdacfc8 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* | qmlplugindump: Mark qsigSegvHandler with Q_NORETURNKai Koehne2018-09-241-1/+1
| | | | | | | | | | Change-Id: I4b25bbe4f777f524762e6f3f15df9fc358a46da6 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* | qmlplugindump: Add spaces to stderr outputKai Koehne2018-09-241-3/+3
| | | | | | | | | | Change-Id: Ib24b06a3c5dcdf99306fd4ecdf79e1846e492c9b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>