aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqml.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update commercial license headersTarja Sundqvist2021-02-021-20/+20
| | | | | | | | | | | | | | | Updated header.COMM to the files in tqtc-qtdeclarative. Examples, documentation files or tests are not updated. The commercial license header may contain some additional lines so that its line count equals with the earlier license header. Reason for this is that some autotests use hard coded line numbers and a change in the line count causes failures in tests. Task-number: QTQAINFRA-4161 Change-Id: Ic1d011aa01b1fe7242bcbbf72d5ab454d1015cf9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Provide a macro for qmlRegisterTypeNotAvailableUlf Hermann2020-02-121-0/+37
| | | | | | | | | | | That is, register QQmlTypeNotAvailable as foreign type under the name given as parameter. Also, statically register QQuickAnimatedImage as unavailable in case of !quick_animatedimage and register it for the right version. Task-number: QTBUG-68796 Change-Id: I2ea292d2aeda66d8ce43b3bccbd3d21663330bd6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2019-10-081-0/+7
|\
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-081-0/+7
| |\ | | | | | | | | | Change-Id: Ib381f350ada365747ce20b989bfdc368d75f2219
| | * qmlRegisterSingletonInstance: Do not crash if instance gets deletedFabian Kosmale2019-10-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a QPointer, so that we notice if the object has been deleted. Also ensure that in the documentation the function is in a single line, as qdoc will otherwise silently omit it. Change-Id: Idecd370d00089997cd18b3247ad2290a561b2b69 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Use qmlProtectModule to protect a module from further modificationUlf Hermann2019-10-081-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need two mechanisms to do essentially the same thing. QQmlTypeLoader::Blob::addImport() had an "optimization" to never check for qmldir files of locked imports. This meant the first time you imported a module with a plugin that locked the module you could use the qmldir file to load additional .qml files afterwards. The second time you imported the same thing, you couldn't. As this is not a great example of consistent behavior, we drop this optimization and always allow the qmldir files of plugins that lock the module to specify additional QML files. As a side effect of this, additional plugins listed in a qmldir file can also now be loaded after the module has been locked by some other means. However, any qmlRegisterFooBar() called from the module will be prevented. Change-Id: Idabb2bd5f75fc85b62f42625173672b4ae84382e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* / Specify parameters of type registration in class declarationsUlf Hermann2019-09-261-9/+172
|/ | | | | | | | | | | | | | | | | | | | | Using this technique we can automatically register all necessary revisions and minor versions of a type, using the metaobject system. This greatly reduces the potential for mistakes and resulting incompatibilities between versions of imports. We assume that for each type we need to register all revisions of its super types and its attached type, and that the revisions match. That is, if you import version X of type A, you will also get version X of its attached type and of any super types. As we previously didn't take these dependencies into account when manually registering the types, a number of extra revisions are now registered for some types. Potentially, we can now generate the qmltypes files at compile time, using moc. Change-Id: I7abb8a5c39f5e63ad1a0cb41a783f2c91909491b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Introduce qmlRegisterSingletonInstanceFabian Kosmale2019-07-191-0/+20
| | | | | | | | | | This method is intended as a replacement for common setContextProperty use cases, where the user is only using one single engine and has already created the object. Task-number: QTBUG-73064 Change-Id: Ib9ec023a0ad679aa22e90ebcb4a0c07622459c61 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-011-0/+20
| | | | | | | | Conflicts: src/imports/imports.pro src/qml/qml/qqmlmetatype.cpp Change-Id: I308436caf55402cb2246cb591c6ac8f83e1febf8
* Clean up the QT_CONFIG(library) conditionsUlf Hermann2019-06-261-2/+0
| | | | | | | | | | | | | We can clear the engine plugins when compiled without library support as those might be static plugins. However, explicitly loading a dynamic plugin is pointless if compiled without library support. We can just disable the whole function. Furthermore, the ability to load dynamic qmldir plugins does not depend on Qt being compiled as shared library but rather on library support being available. Change-Id: I8553706f0f8f5bd4e98cc130bf56c4526f81b85f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Split qqmlmetatype{_p.h|.cpp} into multiple filesUlf Hermann2019-02-061-0/+116
Having all those classes in one big file promotes spaghetti code and makes the code unreadable. Change-Id: I3b6df93b9cfe1d97228771049b3054e78b868ea3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>