aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlimport.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash when calling QQmlEngine::clearComponentCache()Simon Hausmann2018-04-101-31/+31
| | | | | | | | | | | | | | | | | We must protect various resources in the type loader with our existing lock. The QQmlTypeLoaderQmldirContent is now value based, so that we can release the lock on the shared cache early. Copying it involves adjusting the refcount of the QHash and QString instances in the QQmlDirParser. The safety of this was verified with a TSAN build and the example supplied in the task. It crashed reliably with TASN errors first and with this patch it runs without errors. Task-number: QTBUG-41465 Change-Id: I616843c4b8bdfd65d1277d4faa8cb884d8e77df8 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit a3ad52526f79c1528f170c8affe5af00b68ca61d)
* Fix dead lock / race in QML type loader when importing pluginsSimon Hausmann2018-02-021-66/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When importing modules - in the QML loader thread - with plugins we keep globally track of the Qt plugins that we have loaded that contain QML modules, to ensure that we don't call the engine-independent registerTypes() function on the plugin multiple times. After registerTypes() we may also call initializeEngine() on the plugin for the engine-specific initialization, which - as a QQmlEngine is provided as parameter - must happen in the gui thread. For that we issue a thread-blocking call that waits until the gui thread has woken up and processed the event/call. During that time the global plugin lock is held by that QML loader thread. If meanwhile the gui thread instantiates a second QQmlEngine and attempts to issue a synchronous type compilation (using QQmlComponent::CompilationMode::PreferSynchronous), then gui thread is blocking and waiting for its own QML loader thread to complete the type compilation, which may involve processing an import that requires loading a plugin. Now this second QML loader thread is blocked by trying to acquire the global plugin registry lock (qmlEnginePluginsWithRegisteredTypes()->mutex) in qqmlimports.cpp. Now the first QML loader thread is blocked because the gui thread is not processing the call events for the first engine. The gui thread is blocked waiting for the second QML loader thread, which in turn is stuck trying to acquire the lock held by the first QML loader thread. The provided test case triggers this scenario, although through a slightly different way. It's not possible to wait in the gui thread for the plugin lock to be held in a loader thread via the registerTypes callback, as that also acquires the QQmlMetaType lock that will interfere with the test-case. However the same plugin lock issue appears when the first QML engine is located in a different thread altogether. In that case the dispatch to the engine thread /works/, but it won't be the gui thread but instead the secondary helper thread of the test case that will sit in our initializeEngine() callback. This bug was spotted in production customer code with backtraces pointing into the three locations described above: One QML loader thread blocking on a call to the gui thread, the gui thread blocking on a second QML loader thread and that one blocking on acquisition of the plugin lock held by the first. Fortunately it is not necessary to hold on to the global plugin lock when doing the engine specific initialization. That allows the second QML loader thread to complete its work and finally resume the GUI thread's event loop. Change-Id: If757b3fc9b473f42b266427e55d7a1572b937515 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Don't reject plugin-only qmldir filesUlf Hermann2017-11-221-2/+2
| | | | | | | | | | | | On QQmlImportsPrivate::updateQmldirContent we need to check if the new module has actually been established after figuring out that it doesn't have any components or scripts. If it has, then we shouldn't fail, as obviously a plugin has been loaded. We don't need to check the component and script versions in that case, as plugins don't have separate versions. Change-Id: Ie328b59038fe65c3f6a2eeecfe969927bba6cd68 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix URL interception for qmldir filesUlf Hermann2017-11-221-2/+25
| | | | | | | | | | | | | | | | | We need to intercept the URL when it is created. This relieves us of the need to hack around in it when actually retrieving the content of the qmldir file and prevents the futile attempt to load remote qmldir files via the code path that should load local ones (or vice versa). The back and forth conversion between URLs and strings is unfortunate, but can only be solved by using QUrl rather than QString where we actually mean URL. This would be a bigger change which is unsuitable for 5.9. Mind that nothing changes for code that doesn't use URL interceptors. Task-number: QTBUG-36773 Change-Id: I6bff3ae352009fdc0a17ec209691c7b390367f11 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Tell QQmlImportInstance::resolveType what kind of type we wantUlf Hermann2017-10-191-16/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | In QQmlTypeData::resolveTypes() we know if we're looking at a reference to a composite singleton type, or some other type reference. When we call resolveType() we expect the correct type to be returned, not only based on URL, but also based on its singleton property. QQmlTypeData::resolveType() eventually invokes QQmlImportInstance::resolveType() which will call fetchOrCreateTypeForUrl(), passing a parameter on whether the result should be a composite singleton. When operating on a qmldir component the component itself encodes this. When fetching a type from a local file without qmldir, we currently assume that it isn't a singleton, no matter QQmlTypeData::resolveTypes() has determined. This means that actual singletons loaded this way later get refused by the sanity check. In order to fix this, pass the information about the expected singleton property on to QQmlImportInstance. This is done using QQmlType::RegistrationType, which gets another entry for "any type". If the expected type is CompositeSingletonType QQmlTypeData::resolveType() will not create a non-singleton type. If it is any specific other type, it will not create a composite singleton. And if it is AnyRegistrationType, it will behave as it previously did. Change-Id: I6b7e082b63582e0aed946bb3d19077b94c7a45f7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix qml cache invalidation when changing dependent C++ registered QML singletonsSimon Hausmann2017-09-121-0/+11
| | | | | | | | | | | | | | | | | | When a qml file uses a qml singleton, we need to reliably detect when the singleton changes and re-generate the cache of the qml file using it. This is a scenario covered and fixed by commit 5b94de09cc738837d1539e28b3c0dccd17c18d29, with the exception that currently QML singletons registered via qmlRegisterSingleton were not added to the list of dependent singletons for a qml file. We can fix this by extending findCompositeSingletons() to also cover the singletons that do not originate from a qmldir file. [ChangeLog][Qt][Qml] Fixed bug where sometimes changes to a qml singleton would not propagate to the users or cause crashes. Task-number: QTBUG-62243 Change-Id: I16c3d9ba65fd82e898a29b946c341907751135a9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix void * usage in our internal APIsLars Knoll2017-08-021-1/+2
| | | | | | Task-number: QTBUG-61536 Change-Id: Ia2b5cfeab093d8be91728032528788dd238c2872 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove unused types on engine destructionSimon Hausmann2017-08-021-2/+2
| | | | | | | | | | | | | The QML engine destructor as well as trimComponentCache() do now clean out unused composite types that the engine registered internally. This helps avoid 'static' leaks, when more and more types would get registered by the engine. Task-number: QTBUG-61536 Change-Id: I5b32af4b88fbf626de8c0bfbaedb2285b09e3679 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QQmlType by valueLars Knoll2017-08-021-27/+29
| | | | | | | | | | | QQmlType is now refcounted, and we need to use it by value, to control it's lifetime properly. This is required, so we can clean up the QQmlMetaTypeData cache on engine destruction and with trimComponentCache() Task-number: QTBUG-61536 Change-Id: If86391c86ea20a646ded7c9925d8f743f628fb91 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix loading of QML plugins with old IID in static buildsSimon Hausmann2017-07-261-2/+2
| | | | | | | | | | | | | | | | | After commit 709f6370884b110def2e4665df8fa7bbf5fae734 we required the use of QQmlExtensionInterface_iid in qml plugins for static linkage. This mean that plugins using the "/1.0" variant would also continue to load, but those not would fail to load. This is annoying when porting apps from older Qt versions. To make the upgrade path easier, let's just support both IIDs. [ChangeLog][Qml] Fix loading of static qml plugins using the old plugin interface id Change-Id: I1c662b1fedad3f32b7dea1eddc32838d2eb9f3be Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Allow import static plugins even when library feature is disabledKimmo Ollila2017-03-031-34/+5
| | | | | | | Removing QT_CONFIG(library) checks around static plugin handling code Change-Id: I5408d0fee2f58b27372c59004351f37ee8f566b9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlImportDatabase: Fix static build with clangRobert Loehning2017-01-311-0/+2
| | | | | Change-Id: I73895a1938c60a9d83f7e8bbe306eb0c3f05a5ed Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Enable resolution of composite types in QQmlTypeNameCacheRobin Burchell2017-01-271-4/+6
| | | | | | | | | | | | | | | | | | | | | We didn't have resolution of composite types previously, which is a prerequisite to do more exciting things with QML types in JavaScript (such as instanceof). By deferring the resolution to QQmlImports, we can avoid the need to fill the cache with types that may not be needed, while still finding types which are requested. In the future, we could consider removing the "special" handling for composite singletons as they should be found through QQmlImports now. If we do that, we may still want to cache the QUrl for the types, to avoid using QQmlImports too often directly, as it is a little slow itself. This change doesn't regress tst_compilation. Task-number: QTBUG-24799 Change-Id: I9ba2e4829ca49008fd180fb488c586475cf90674 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQmlImport: Decouple QQmlImportNamespace & Import type from qqmlimport.cppRobin Burchell2017-01-261-69/+34
| | | | | | | | | Using nested types means we cannot forward declare them, which is basically a prerequisite for using these classes anywhere else. As we want to do that for QQmlTypeLoader, let's untangle the knot. Change-Id: I05fff3521cda553965ae3368eb3731265bf46a9c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Un-nest QQmlTypeLoader::QmldirContentRobin Burchell2017-01-261-11/+11
| | | | | | | | | This is mandatory to split some of QQmlImport's internal classes out into headers for reuse elsewhere, as we cannot forward-declare a nested class. Change-Id: I6524a372a89b37a22a99ed3eada76036e10e8660 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQmlImport: Document some methods used by QQmlTypeLoaderRobin Burchell2017-01-261-0/+16
| | | | | Change-Id: Ibe21938e83571e78d1baaca4c1f4b26563ab2f3a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQmlImport: Document populateCache methodRobin Burchell2017-01-261-0/+11
| | | | | Change-Id: Ibf559814d3d86b23c12a194fa619c207790e1e1d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Slight improvements to resolveType for the common caseRobin Burchell2017-01-251-9/+13
| | | | | | | | | | Only resolveLocalUrl if we really have to. The string manipulation are quite expensive. This boosts tst_compilation::bigimport a tiny bit. Change-Id: I435633c8be9fcf4f8166900e8c0a52b320fb64d3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQmlImport: Add a little documentation for QQmlImportNamespace & ImportRobin Burchell2017-01-251-7/+39
| | | | | Change-Id: Iee1dc32a5921b5da6d1511f26e93998baaae918e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQmlImport: Clean up & rename getTypeForUrl to fetchOrCreateTypeForUrlRobin Burchell2017-01-251-34/+66
| | | | | | | | | The new name better matches what the method does. At the same time, clean it up a little: make the flow a little clearer, extrapolate on some comments, remove some old debug. Also add a small method doc explaining this method does. Change-Id: I494efc2dfe8760734f228a9af440abf7067354b7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-141-7/+7
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp src/qml/qml/qqmlimport.cpp src/quick/items/context2d/qquickcontext2dtexture_p.h tools/qmleasing/splineeditor.h Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
| * Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-7/+7
| | | | | | | | | | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QQmlImportsPrivate: remove homebrew 'greaterThan'Anton Kudryavtsev2016-10-271-5/+2
| | | | | | | | | | | | | | Use std::greater Change-Id: I30554cd85b05e8c6ce13402d4b318751315cd0e6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-09-211-15/+18
|\| | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4isel_moth_p.h Change-Id: I8e86a649d1ef8ad27dc66cc8c290093b2faabc69
| * QML: Cleanup prefix/suffixes for plug-in resolvingErik Verbruggen2016-09-191-15/+18
| | | | | | | | | | | | | | So now we can read it without getting cross-eyed. Change-Id: Ica6a072fcd505fd4fedca3ccfac7dfc00b522354 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Qml: replace 'foreach' with 'range for'Anton Kudryavtsev2016-09-201-13/+13
| | | | | | | | | | | | | | Not all, just instances with low risk. Change-Id: Ie6b4530f748e04ccb90e7ef23415a91d6c377417 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | QQmlImportNamespace: mark findImport() method as constAnton Kudryavtsev2016-09-171-7/+6
| | | | | | | | | | | | | | | | | | This method does not modify the object. While touching the code, port loop to C++11 'range for', and replace 0 with nullptr Change-Id: I3695f3aa162daf0da396a0991d96ac4c438c1221 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | QmlImports: Extract Method makePlugins()Anton Kudryavtsev2016-09-161-10/+16
|/ | | | | | | This way we can keep the vector of plugins const. Change-Id: Icb5e8b6f461586aecb389144603aa4f0734c304b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-191-1/+1
|\ | | | | | | Change-Id: I326616356ee26d4532c6d57558c43c919f0a900d
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-181-1/+1
| |\ | | | | | | | | | Change-Id: I20c622263f40c322954328e4d10a8071db3ca6d1
| | * Doc: Change instances of 'OS X' to 'macOS'Topi Reinio2016-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change all occurrences where the Mac platform is discussed to use the macro \macos (defined in the documentation configuration in qtbase). Change-Id: Iea114ac73c01d74401bcd77373b41a825d2636c9 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | Qml: optimize string usageAnton Kudryavtsev2016-08-091-15/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use QStringBuilder more. Use QString::asprintf instead of arg()'s chain. Use += operator to reserve extra capacity for possible free following append/prepend/+= call. Change-Id: Ib65398b91566994339d2c4bbfaf94e49806b7471 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QQmlImports: optimize excludeBaseUrlAnton Kudryavtsev2016-08-091-3/+1
| | | | | | | | | | | | | | | | | | | | | Don't allocate memory. Change-Id: I50542bd77c9b5432d452fec2a87b6858b5c4f9c7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Qml: replace QStringLiteral with QL1SAnton Kudryavtsev2016-07-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... or with QL1C in such cases: - if there is overloaded function - in QStringBuilder expressions Saves ~1.5 KB in text size. Build config: ubuntu 16.04 x64, gcc 5.3 Change-Id: Icc0789f1c244ce20a3182494b0c7f35c9d77e41d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devSimon Hausmann2016-05-181-10/+31
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/v8/qqmlbuiltinfunctions_p.h tests/auto/qml/qqmlqt/tst_qqmlqt.cpp Change-Id: I9dd93732f4b19513576ca1dd89ae18c69de0203b
| * | Teach the QML engine to find static Qt Quick Controls 2 stylesJ-P Nurmi2016-05-111-10/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The styles are installed to eg. qml/QtQuick/Controls.2/Material. That is, the version is in the parent module. See 3c5e438 for more details. Change-Id: Icdeccb356554ada74dd1116b99be198565c98de6 Task-number: QTBUG-53284 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* | | Re-apply the cast part of commit 392c7b99348e2a96ef11adb5712095fbd13fb780Simon Hausmann2016-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We reverted this in 6f59c91c51edd7207635c3fa2f0b2b1179e7aa6e to avoid further breakage in a patch release. Now let's do the right thing in the next minor release and replace the qobject_cast on the instance with the IID check that won't require instantiating the plugin in the qml loader thread. [ChangeLog][QtQml][Important Behavior Changes] When the engine looks for QML modules / extension plugins in statically linked applications, the plugins are not instantiated in the qml loader thread anymore. For this to work however it is necessary for plugins to use Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) in their class declaration instead of hardcoding the interface id as a string literal. Task-number: QTBUG-52012 Change-Id: I45fe8b9fec23b3d0408b7ee79ce297c7d47ce36d Reviewed-by: Sebastian Lösch <Sebastian.Loesch@governikus.com> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | | Avoid QHash::values()Frank Meerkoetter2016-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Doing so will spare us from creating a temporary container just to iterate over it. Change-Id: Iab6aec0d83bfc168f12d2348909b053dfddf67a1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-131-39/+73
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsapi/qjsengine.cpp src/qml/qml/qqmlengine_p.h src/quick/items/qquickanchors.cpp src/quick/items/qquickanimatedimage_p_p.h src/quick/items/qquickitem_p.h tests/auto/qml/qqmlecmascript/testtypes.h tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp tests/benchmarks/qml/creation/tst_creation.cpp Change-Id: I65861e32f16e8a04c7090a90231627e1ebf6ba6f
| * | Merge remote-tracking branch 'origin/5.6.1' into 5.7Simon Hausmann2016-05-091-1/+1
| |\| | | | | | | | | | Change-Id: I6648a0ce49e0fd2b0881444bd38b9a10c093dc18
| | * Revert parts of 392c7b99348e2a96ef11adb5712095fbd13fb780Simon Hausmann2016-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert the plugin loading check for Qt 5.6.x. It turns out that making this check strict broke multiple static plugin builds beyond the qtdeclarative repository. Let's not cause unnecessary breakage in a patch release of Qt to fix a bug that has existed for much longer. I'll revert this change in the dev branch for Qt 5.8, together with an entry in the change log to inform the developers that a behavioral change in their code is necessary (the use of the interface id variable). Change-Id: I3c658433eaa125ac0d272806e3bbbf016cf6d3cb Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-271-2/+2
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickimagebase.cpp src/imports/layouts/plugin.cpp Change-Id: I5f48474df4034a1347ec74795c85d369a55b6b21
| | * Instantiate static Qml plugins declaring QQmlExtensionInterface onlySebastian Lösch2016-04-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When instantiating static plugins no check is done whether the QQmlExtensionInterface is declared. Therefore all user plugins are instantiated in the Qml thread, which may cause problems. Task-number: QTBUG-52012 Change-Id: Ia91ec5ec7b2a9721bd11e3648cdc161855b4454e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * | Use QStringRef to optimize memory allocationAnton Kudryavtsev2016-04-261-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace substring functions that return QString with corresponding functions that return QStringRef where it's possible. Create QString from QStringRef only where necessary. While touching the code, also port loops to C++11 style. Change-Id: I04c99b24ea6afd3715e3edf9ea00bfab838fd53c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * | Allow target path version in a parent moduleJ-P Nurmi2016-04-211-32/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example, the QML Engine is now able to locate QtQml.Models 2.x in both of the following target/installation paths: - QT_INSTALL_QML/QtQml/Models.2 - QT_INSTALL_QML/QtQml.2/Models This is required for QtQuick Controls 2. The target path of the module is QT_INSTALL_QML/QtQuick/Controls.2. The built-in styles are installed as sub-directories to be able to locate them from the controls module. Some of the built-in styles provide their own C++ extensions via style- specific imports (eg. the Material attached property is imported from QtQuick.Controls.Material 2.0). The problem is that the QML Engine does not find the module from QT_INSTALL_QML/QtQuick/Controls.2/Material, but requires it to be installed outside the main controls module ie. QT_INSTALL_QML/QtQuick/Controls/Material(.2). This makes it a) hard to locate the styles from the main controls module, and b) conflicts with the target path of QtQuick Controls 1. [ChangeLog][QtQml] Made the QML Engine capable of locating QML sub- modules from within a versioned parent module path. For example, QtQml.Models 2.x can be either in QT_INSTALL_QML/QtQml/Models.2 or in QT_INSTALL_QML/QtQml.2/Models. Change-Id: I2fe4bbdd6d04dd1e80cbe9b3e7e02617658a0756 Task-number: QTBUG-52556 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Scrape off a few allocations by using the QStringBuilderFrank Meerkoetter2016-05-091-4/+1
|/ / | | | | | | | | Change-Id: I7689fabb5398c2c2d2781b2c788dcc60f4e1ea44 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QQmlImportDatabase: Introduce utility message function.Friedemann Kleint2016-03-251-5/+7
| | | | | | | | | | | | | | Reduces the number of messages that need to be translated. Change-Id: I986d3202ac2dcc6c8e197e19c735dd66dad37f39 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-181-6/+13
|\| | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicklistview/tst_qquicklistview.cpp Change-Id: I9588a3e2c7d590e031dd4c66905a79f0d74d3ac8
| * qml: preserve composite singleton types.Marco Benelli2015-12-171-6/+13
| | | | | | | | | | | | | | | | Composite singleton types used to always have version -1,-1; regardless of what is written in qmldir. Change-Id: Ia193e73695e57095f6a09b97768805f2f23cd56a Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>