aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcachegen/qmlcachegen.pro
Commit message (Collapse)AuthorAgeFilesLines
* Ensure we restore QML-defined enumsMichael Brasser2018-05-231-0/+2
| | | | | | | | | | | | This code path was previously missed, leading to some AOT-compiled types generating errors of the form: Unable to assign [undefined] to int [ChangeLog][QtQml] Fix QML declared enums with CONFIG+=qtquickcompiler. Change-Id: Ib46a2b2505aa3863f091a6ccdebf8425e62fc38f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix .import within .js files with CONFIG+=qtquickcompilerSimon Hausmann2018-05-111-0/+2
| | | | | | | | | | | | | | | | | When loading a .js file without QQC, we scan the sources and use the ScriptDirectivesCollector to extract things like .pragma library or .import ahead of time. That information is passed on to the compilation unit generator for serialization. When compiling .js files ahead of time, we also used the same collector, but we forgot to save the data into the right location before serialization, so we essentially lost the imports. This patch fixes that by centralizing this code into the ScriptDirectivesCollector itself. [ChangeLog][QtQml] Fix regression with .import in .js files not working when using CONFIG+=qtquickcompiler. Change-Id: I5413c14b1b8bd3114a997011534fe55cdb7634aa Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix CONFIG+=qtquickcompiler with paths that contain spacesSimon Hausmann2018-03-271-0/+2
| | | | | | | | Map spaces to underscores as well. Task-number: QTBUG-54683 Change-Id: Id73c086a2845111623df631c06733ba2b42249e0 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Fix QML data structure version checking for ahead-of-time generated filesSimon Hausmann2018-03-201-0/+2
| | | | | | | | | | | | | | | | | | We must also do version checking for QML and JS files that were compiled ahead of time and are embedded in resources. If the lookup for the original source code fails, then we must generate an appropriate error message. As an upside we get better error reporting when trying to load an empty file and Qt.include() now reports the error message in the statusText field. The error reporting for imported scripts was not changed as importing an empty script is (oddly) allowed. Task-number: QTBUG-66986 Change-Id: Ie0ef81af371a51ecf8c66ae7954d43f5cc6c12de Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Add support for compiling QML/JS files ahead of time in resourcesSimon Hausmann2018-01-281-1/+5
| | | | | | | | | | | | | | | | | | | This is bringing over the loading infrastructure from the Qt Quick Compiler that allows embedding qml/js files in resources and compiling them ahead of time. At the moment, the approach of generating one cpp file per qml/js file and the loader stub is needed because the build system does not support dynamic resource generation. In addition, as per QTBUG-60961, we must ensure that the generated data structures are aligned. To retain compatibility this is enabled via CONFIG += qtquickcompiler, but we may need to find a new name (but should keep the old one in any case). Task-number: QTBUG-60961 Change-Id: Ia9839bf98d3af4c50636b6e06815364a9fc7ee57 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add auto-test for qmlcachegenSimon Hausmann2017-04-061-0/+7
This test writes a simple QML file with embedded JS code into a temporary directory, calls qmlcachegen to generate the cache file, removes the original source code and tries to load the component. Change-Id: I63e1b0c76a987f4a21b3dc6cb7c4dc828dd5d11f Reviewed-by: Lars Knoll <lars.knoll@qt.io>