aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* 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 "Merge remote-tracking branch 'origin/5.13' into dev"Qt Forward Merge Bot2019-08-201-10/+0
|\
| * Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-08-201-10/+0
| |\ | | | | | | | | | Change-Id: I9ce3eee3d6f88783b9e20110a2814bee805291a4
| | * Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-08-051-10/+0
| | |\ | | | | | | | | | | | | Change-Id: I042df89ddd381c7fbb944b7ff49d5b45b764fd47
| | | * Revert "Yield error if qtquickcompiler is used in non-QML projects"Jörg Bornemann2019-08-021-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c5578b16d6454e708c8ce12661a85d41eeaaa758, because it prevents enabling the qtquickcompiler feature globally. Fixes: QTBUG-77277 Change-Id: Ic80835c462570a67ae3105bb3d1b6452800d2c94 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | | | Fix build without features.temporaryfileTasuku Suzuki2019-08-192-0/+12
|/ / / | | | | | | | | | | | | Change-Id: If990efb64a4117bc7624062fededa7ce6a910f14 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | qmllint: Fix compiler warningJarkko Koivikko2019-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | findunqualified.cpp(776) : warning C4172: returning address of local variable or temporary: dbg Change-Id: Ifce7ccdcce9ed629a2a9dd4759620d02804812b7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | qmllint: do not warn about the identifier of a catch statementFabian Kosmale2019-08-191-1/+2
| | | | | | | | | | | | | | | Change-Id: I2e679fe4fbebff7d8252da6ea69aed3cc9ffab41 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | qmllint: Fail on recursion depth errorsUlf Hermann2019-08-192-1/+7
| | | | | | | | | | | | | | | | | | Change-Id: I815f82ed8c005ed83ceecff6ce80106a9ad9b21d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | CMake: Provide API to allow handling of QML static pluginsAlexandru Croitor2019-08-174-3/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a new -cmake-output command line argument to qmlimportscanner which outputs its result in a format which is consumable by CMake. This change also adds a new CMake package called Qt5QmlImportScanner. It provides a function called QT5_IMPORT_QML_PLUGINS() which is useful for projects that use a static build of Qt and which also use QML plugins. Calling it with the target name of your application does the following: - Runs qmlimportscanner at configure time to find out which QML / QtQuick plugins are used by your project - Links the imported QML plugins into the target - Links the static dependencies of the QML plugins into the target - Generates a .cpp file that initializes imported QML plugins, which is subsequently compiled and linked into the given target When Qt is built in a shared library config, the introduced function is a no-op. [ChangeLog][CMake] Added ability to import static qml plugins with CMake builds using the new QT5_IMPORT_QML_PLUGINS function. Task-number: QTBUG-38913 Change-Id: Ib9b9a69654eab13dfbe12d10f5cb28ba3c307d1b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | linter: Cover all supported JavaScript functionsFabian Kosmale2019-07-261-12/+13
| | | | | | | | | | | | | | | | | | | | | + qDebug/commented out code cleanup Change-Id: Id6a4410391eed2fbf6ff0dd7aaffa1de4d5b892c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | qmllint: Improve parent handlingFabian Kosmale2019-07-264-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Do not warn about parent access in unknown components This avoids false positive warnings when an imported component could not be found (or when it actually was not imported). We still warn about the component which could not be found, so the user is still informed that something is not right. We also still emit a warning when we know the properties of a component, and parent is not one of them. - Do not recommend the use of parent to address the root components properties. For this to work, we would need to know whether the root component reparents its children or not. Moreover, id lookups are actually faster than parent lookups. Change-Id: I83d0e71e4bf20d34a3e6d836c2b123b2bf0d416e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | qmllint: Improve signal handler recommendationsFabian Kosmale2019-07-253-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix the case where multiple unqualified accesses would be mapped to the same signal (wrong in all but one cases), as the event parameter has the same name and we were using a QHash. Fixed by using QMultiHash and searching for the matching signal handler (by location) - Recommend arrow functions for single line event handlers Change-Id: I3cbb85fe0e49b454908ca03b4c86318ef02e364c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.13' into dev"Qt Forward Merge Bot2019-07-121-0/+10
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-121-0/+10
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmltypeloader.cpp src/quick/scenegraph/qsgopengldistancefieldglyphcache.cpp Change-Id: I1a226d8738db2ec06e3cef240a0e040e7c144cad
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-051-0/+10
| | |\| | | | | | | | | | | | | Change-Id: I47735445e4d31ba47d596d964b3f050e263bd1d9
| | | * Yield error if qtquickcompiler is used in non-QML projectsJoerg Bornemann2019-07-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider a non-QML project that puts .js files in a Qt resource file. The qtquickcompiler feature will pull those files out of the resource and generate QML-specific code, which will lead to build errors. Yield an error message on qmake-time. Fixes: QTBUG-73669 Change-Id: I6bec22f758d884ce4e1c50fca48f452c5f86ce74 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | | Extend linter to check for unqualified idsFabian Kosmale2019-07-1214-4/+3606
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The linter has gained a new option (-U/--check-unqualified). If run with this option, it warns about occurrences of unqualified identifiers. Furthermore, it attempts to detect the reason for why the identifier can be used unqalified: - If the id originates from the root element, it suggests to qualify the access either with the root element's id, or with "parent" if applicable. - If the id is the parameter of a signal, it suggests to use functions in the handler, instead of relying on the signal parameters to be "magically" injected into scope. The linter does not attempt to handle with statements, but warns the user instead that they are a bad idea. Change-Id: I9aaf28c37595d84886a1071d49b86799b222a617 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Disentangle includes and namespacesUlf Hermann2019-07-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Avoid using namespace in headers and include only the headers we actually need. Change-Id: I526a0f874dc09b07693fd87070665be396d3b637 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge JSCodeGen and QQmlJSCodeGeneratorUlf Hermann2019-07-101-7/+2
| | | | | | | | | | | | | | | Change-Id: I2219cba0dd3782cb2e0b09b8f3c4d5472e6e5d7e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Simplify codegen error handlingUlf Hermann2019-07-041-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There can only ever be one error, either a syntax error or a reference error. We record the error type as we want to get rid of the virtual throw<X>Error methods in favor of an explicit compilation result. Change-Id: Ie228490aad8efb7885083f6485f931299567f54c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.13' into dev"Qt Forward Merge Bot2019-07-041-1/+5
|\ \ \
| * | | 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>
* | | | extend grammar for better version parsing supportFabian Kosmale2019-07-041-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Be more strict in parsing version numbers This also makes it easier to access the version number in other places using the Visitor interface, like (soon) the linter and avoids reparsing the text twice. Potential disadvantages: previously allowed import statements will rejected at parse time, e.g. import QtQuick 0b10 Potential further advantage: Weird import statements like import QtQuick 0b10 will be rejected earlier Change-Id: Ifcd187b79a90952bc964c688afa4ea9b158e5109 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Eradicate Java-style iterators and mark the module free of themMarc Mutz2019-07-041-3/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | Java-style iterators are scheduled to be deprecated, or at the very least banned from use in Qt's own implementation. Change-Id: I6a1aeceb22dfa13c4ed7443296455b60abed7d67 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Add the graphics api independent scenegraph portLaszlo Agocs2019-07-042-11/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Opt in via environment variables: QSG_RHI=1 -> enable using QRhi instead of GL QSG_RHI_BACKEND -> set to vulkan, metal, d3d11, gl to override the default (the default is d3d11 on Windows, metal on Mac, gl elsewhere) Or force a given rhi backend via the existing QQuickWindow::setSceneGraphBackend(). Otherwise the default behavior is the same as before, the rhi code path is never active by default. -no-opengl builds are supported in the sense that they work and default to the software backend. However, the rhi code path cannot currently be used in such builds, even though QRhi from qtbase is fully functional with Vulkan, D3D, or Metal even when qtbase was configured with -no-opengl. This cannot be utilized by Quick atm due to OpenGL usage being all over the place in the sources corresponding to the default backend, and those host the rhi code path as well. This will be cleaned up hopefully in Qt 6, with the removal all direct OpenGL usage. Other env.vars.: QSG_RHI_DEBUG_LAYER=1 -> enable D3D debug or Vulkan validation layer (assuming the system is set up for this) QSG_RHI_SHADEREFFECT_DEBUG=1 -> print stuff from ShaderEffect QSG_SAMPLES=1,2,4,... -> MSAA sample count (but QSurfaceFormat works too) QT_D3D_ADAPTER_INDEX=0,1,... -> D3D adapter index QT_VK_PHYSICAL_DEVICE_INDEX=0,1,... -> Vulkan physical device index QSG_RHI_UINT32_INDEX=1 -> always use uint index data (both merged/unmerged, convert when needed - with some rhi backends this is implicit) QSG_RENDER_LOOP -> to override the render loop as usual. The default with RHI is threaded for Metal, threaded for Vulkan on Windows, basic for Vulkan on Linux and Android (to be checked later), while the existing rules apply for OpenGL. Not supported when running with QRhi: - particles - compressed atlases (though this is transparent to the apps) - QSGRenderNode - QQuickRenderControl - QQuickFramebufferObject - certain QQuickWindow functionality that depends directly on OpenGL - anisotropic filtering for textures - native text may lack some gamma correction - QSGEngine applicability unclear - some QML profiler logs may be incorrect or irrelevant Change-Id: I7822e99ad79e342e4166275da6e9e66498d76521 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Port to somewhat stricter implicit conversions to QCharMarc Mutz2019-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, QChar can be implicitly converted from nearly any integral type. The goal for the future is to allow only actual character types ((u)char/char16_t) to implicitly convert to QChar. This patch prepares the code for such a change. Change-Id: I6db0a9214c48912e11ce6e90050223fa9dd8d3a2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-012-22/+29
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/imports.pro src/qml/qml/qqmlmetatype.cpp Change-Id: I308436caf55402cb2246cb591c6ac8f83e1febf8
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-282-22/+29
| |\| | | | | | | | | | Change-Id: I59343fe228ca6b823b61577e5a0907e7381899c2
| | * Unregister unit cache hook when destroying the plugin singletonMitch Curtis2019-06-251-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | At the point the plugin is actually unloaded the hook turns into a dangling pointer. Fixes: QTBUG-71387 Change-Id: Ib8ccee3f9a86d4700fbea7e87c666cd8f30f71e4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * qmlscene: Fix setting of the default surface formatJoni Poikelin2019-06-251-21/+23
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-76603 Change-Id: I2977117dcaf45345c14599e0b38cb4a242ee449b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | qmlscene: Avoid infinite loopUlf Hermann2019-06-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the root document doesn't contain any executable code, we should terminate with an error message rather than loop forever. Change-Id: Ice2ff10ae5dc9d71df2d1c784597393695ab1d98 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | Move saveToDisk into SaveableUnitPointerUlf Hermann2019-06-241-21/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | This way we can keep the flag mutilation closely local to the place where we write the data. Also, SaveableUnitPointer doesn't need a full CompilationUnit this way. Change-Id: I01872e4c406cb2ccbaa1fa35325cc063b1e8a7df Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Simplify errors and diagnosticsUlf Hermann2019-06-143-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We only need two classes to describe all possible diagnostics: * A low-level private POD DiagnosticMessage. This is easily copied and passed around internally. It doesn't need to adhere to a stable API and it doesn't carry any extra baggage. * The high-level public QQmlError with its stable interface. This can internally also use a DiagnosticMessage as storage. Change-Id: I52be88d9b5d9855a661b8032b01eedb43a0fb0b3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Convert uses of QTime as a timer to QElapsedTimerEdward Welbourne2019-06-122-4/+4
| | | | | | | | | | | | | | | | | | Change-Id: Ia34d3980e48d2978c8c77e65b1ee2aa7f71fd985 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | rtems: skip toolsMikhail Svetkin2019-06-111-1/+1
| | | | | | | | | | | | | | | Change-Id: I63eaaee89d77b12fe98ebef91ce13b0c698f7beb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Split QV4::Value into a static and a dynamic partUlf Hermann2019-05-312-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The static part can be used for compilation and won't resolve managed objects. This allows us to remove all the remaining V4_BOOTSTRAP. Change-Id: Id2f6feb64c48beb2a407697881aea8c0d791a532 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Add abstraction for temporarily setting StaticData when savingUlf Hermann2019-05-171-22/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | The StaticData flag needs to be saved to disk, but removed again afterwards so that we can free() the malloc'd data. This also allows us to avoid copying all the data into a byte array before saving. Change-Id: I96513f8d98acf0ea0b4514d96376b487e8444917 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Split CompiledData::CompilationUnit in twoUlf Hermann2019-05-162-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | We need a CompilationUnit that only holds the data needed for compilation and another one that is executable by the runtime. Change-Id: I704d859ba028576a18460f5e3a59f210f64535d3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Move compileModule() into qv4codegen.cppUlf Hermann2019-05-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a better fit for the method. In turn, remove all the V4_BOOTSTRAP conditions from qv4engine_p.h and make sure we don't include or compile it in bootstrap mode. Change-Id: I5933b0724e561313ca20c420b83e4d70e63bddf5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-05-021-1/+1
|\| | | | | | | | | | | Change-Id: I5d2c3da38df35922b2147c3c0bc55c6c3bae2fe5
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-011-1/+1
| |\| | | | | | | | | | Change-Id: Ic008bf9223a9ac293c925044355ff218f7ed7f78
| | * Skip QtQuickCompiler resource extraction when using lupdateSimon Hausmann2019-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise lupdate won't see a .qrc file that contains the .qml/.js files. Change-Id: I8b5fd79299adcde338d68fb6ca39ab03c9300286 Fixes: QTBUG-75501 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | qml runtime tool: support alternate conf; add resizeToItem confShawn Rutledge2019-04-256-20/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qmlscene --resize-to-root feature has always been missing from the qml runtime tool; however it was already possible to add it by writing a custom configuration file. Now we support loading different configurations from resources as well as from the filesystem, and the first new configuration being added here is resizeToItem.qml which provides behavior equivalent to qmlscene --resize-to-root. When the argument given to --config ends with .qml, by convention it's to be loaded from the filesystem; whereas configurations from resources are specified without the .qml extension (to make the command line shorter). [ChangeLog][QtQml][qml] The QML Runtime tool now has default behavior matching qmlscene when the root QML object is an Item: it will be wrapped in a Window which will resize the Item when the Window is resized. But you can alternatively use the --config resizeToItem option, resulting in the same behavior as qmlscene --resizeToRoot: resizing the root Item programmatically causes the wrapping Window to be resized. Behavior can still be customized in other ways using the --config option with an external QML configuration file. Task-number: QTBUG-53557 Change-Id: Icdcbbd12258105c33b64634049d735e022dfbd06 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | qml runtime tool: --quiet disables categorized logging tooShawn Rutledge2019-04-251-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQml][qml] The QML Runtime tool --quiet option now disables categorized logging in addition to qDebug, qInfo, qWarning and qFatal, except for some early QPA-level categorized logging that occurs during application construction. You can still override specific categories by setting QT_LOGGING_CONF or QT_LOGGING_RULES. Change-Id: Icf986a7fa9980d07beed308df8f69fcc4da9d771 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | qml runtime tool: group globals and declare static; improve paddingShawn Rutledge2019-04-251-43/+29
| | | | | | | | | | | | | | | | | | | | | This fixes a few code model warnings. Change-Id: I0739e19ad5601caa4177f0fd843b1a8d38c936a6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Use QCommandLineParser in the qml runtime toolShawn Rutledge2019-04-241-114/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some advantages: - support double-hyphen options as well as the existing single-hyphen options - support translation of the usage text [ChangeLog][QtQml][qml] The QML Runtime tool now accepts command-line arguments in double-dash GNU style as well as the old single-dash style. Task-number: QTBUG-53557 Change-Id: I9929c63841272894640abe254efaea9773eee633 Reviewed-by: Ulf Hermann <ulf.hermann@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>