aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcachegen
Commit message (Collapse)AuthorAgeFilesLines
* QQmlIRLoader: Actually load RequiredPropertyExtraDataFabian Kosmale2021-02-032-0/+17
| | | | | | | | | | | | | | | If a QML component wants to mark properties of its "parent" component as required, it can do so via required propertyName The information about those properties is stored in a RequiredPropertyExtraData data structure. This structure is already serialized to disk in the QQmlIRWriter. However, we neglected to restore it so far in the loader. Fixes: QTBUG-90538 Pick-to: 5.15 6.0 Change-Id: I789daff9bc881e4f35c942c77f5116b5284de81b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove the qmake project filesFabian Kosmale2021-01-151-39/+0
| | | | | | | | | Remove all qmake project files, except for examples which are used to test that qmake continues to work. Change-Id: Ic4abb72dc2dcd75df7a797c56056b6b3c5fe62ac Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-10-061-9/+9
| | | | | | | | 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>
* Fix additional warnings from usage of deprecated APIsVolker Hilsheimer2020-09-161-1/+1
| | | | | | | | | | Replace more QLibaryInfo::location with QLibraryInfo::path Replace old event accessors APIs, including relevant comments. Change-Id: Ie205fc93b6e1c0dfb3dca9100fbde417ab68fc9f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQmlIRLoader: Restore inline components correctlyFabian Kosmale2020-07-222-0/+24
| | | | | | | | | | | | | | Whether a component is an inline component is not only stored in the flags, but also in the isInlineComponent member. Ideally, this should be unified and the member removed, but for now we just restore the value correctly. Adjusted tst_qmlcachegen::initTestCase so that we testFile and testFileUrl are actually usable in the test. Fixes: QTBUG-84237 Pick-to: 5.15 Change-Id: I759cd6b8914b186b9e5c8118863fc8d0580d21af Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* CMake: Fix failing tst_qmlcachegen::skippedResourcesAlexandru Croitor2020-07-073-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | The test was failing in CMake configurations because the pro2cmake generated code set the QT_SKIP_QUICKCOMPILER property on a non-existing file path (it was missing "data/"). Fix this manually by specifying the correct file path. Add a SkipQmlCacheGen.qml file to make it more clear what the file is used for. The previous alias from Retain.qml to Skip.qml was confusing, and also was overriding the source file properties on the same file that was part of 2 different resources. Keep the alias to Skip.qml so we don't have to touch the C++ code. pro2cmake will be fixed in a separate change to output correct file paths. Amends 41890402db086f4c61e052cef7659eb6b003dc77 Task-number: QTBUG-85364 Task-number: QTBUG-84886 Change-Id: I6e49deb8758403241d6f804af797adf2f05fda05 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Revive QTQUICK_COMPILER_SKIPPED_RESOURCESUlf Hermann2020-06-303-2/+22
| | | | | | | | | There are valid reasons not to compile some resources with qmlcachegen. Pick-to: 5.15 Fixes: QTBUG-85243 Change-Id: I9a1233864ed5dda0c264e61db596a9d8c80ea1f3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Make qmlcachegen test ASAN cleanUlf Hermann2020-06-161-1/+3
| | | | | | | | The unitSize given there is the size of the qmlData. The previous code copied some other random stuff around. Change-Id: Idb5efac27fa9fbf6950850050627822a824e97ad Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Prepare for new members in QQmlPrivate::CachedQmlUnitSimon Hausmann2020-04-211-8/+8
| | | | | | | | Pass the address of the entire structure through to the compiler, so that when adding new members we can easily access them. Change-Id: I5da75ba4e64d3e0e750a3ff3df4edbb88cdb6937 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Update Apple platform defines after rename in qtbaseTor Arne Vestbø2020-03-171-2/+2
| | | | | Change-Id: Ia0a075e3199eab735f9b289873beeb8730ebc47e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Regenerate qtdeclarativeAlexandru Croitor2020-02-121-4/+2
| | | | | | | Change-Id: I48d7fd306f3d1b161a8e73029282ee591b1ef612 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* Regenerate TestsLeander Beernaert2020-01-161-0/+1
| | | | | | Change-Id: Ib0eff9cb83b6e4c3cdbec4388969e4a194d1a88c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2019-11-253-1/+19
|\ | | | | | | Change-Id: I48b9c2e4f3a75c18470c55f73f2089dc1401de54
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-243-1/+19
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlpropertyvalidator.cpp tests/auto/qml/qmlmin/tst_qmlmin.cpp Change-Id: I920c133e839d980ed32c179a0bc4fa44c46e2296
| | * Pass suitable nFormals when constructing JS stack frameUlf Hermann2019-10-213-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | The extra formal parameters for signal handlers are not passed in "registers" and therefore should not be given here. Fixes: QTBUG-78486 Change-Id: I18594e0139a7a23d4e53b41e8b00b1e9f2e07aeb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Regenerate all projects with new CMake API versionAlexandru Croitor2019-11-151-8/+8
| | | | | | | | | | | | | | | | | | Change-Id: Ie0db35f674137c229eaf049616f38f8e818f7092 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Regenerate testsAlexandru Croitor2019-11-141-14/+15
| | | | | | | | | | | | | | | | | | Change-Id: I67a6c8f1659e7b471a4fcb92a2699292cf4eea81 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Regenerate required projects after dev -> wip/cmake mergeAlexandru Croitor2019-10-141-8/+7
| | | | | | | | | | | | | | | Change-Id: Ic5f1909731ec11b4fb6bc8823506d272c529ecfb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-145-16/+32
|\| | | | | | | | | | | | | | | | | | | | 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-044-1/+22
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/qtquick2/plugins.qmltypes src/quick/items/qquickitemsmodule.cpp Change-Id: I841c65c9c131354788b4f3fcfe3d7ed27be316d5
| | * Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-124-1/+23
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine.cpp src/quick/handlers/qquicktaphandler.cpp src/quick/items/qquicktableview.cpp Done-With: Richard Moe Gustavsen <richard.gustavsen@qt.io> Done-With: Ulf Hermann <ulf.hermann@qt.io> Done-With: Shawn Rutledge <shawn.rutledge@qt.io> Change-Id: If9558a33f01693ce96420c094e0b57dfff0626cd
| | | * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-284-1/+23
| | | |\ | | | | | | | | | | | | | | | Change-Id: I0ae0a162e133cffd8fb1a2c6b70826e50f06facd
| | | | * Fix loading of ES modules when using CONFIG += qtquickcompilerSimon Hausmann2019-08-264-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added the missing lookup for cached .mjs files in ExecutionEngine::compileModule. This allows using .mjs files in WorkerScript {} elements in conjunction with the Qt Quick Compiler and also fixes the use when using QJSEngine::importModule. [ChangeLog][QtQml] Fix loading of EcmaScript modules when using the Qt Quick Compiler. Fixes: QTBUG-77761 Change-Id: I58130b0468f4920b2f6c49b98a2f51d5ae3a0491 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * | | | Fix regression when using CONFIG+=QtQuickCompiler and .qrc files in subdirsSimon Hausmann2019-09-193-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 41864db3b61d9e81a9fe4906918d2cd3d6d32a0c removed the processing of .qrc files that removed .qml/etc. files. Since the chaining of resources remains critical to ensure that the cached compilation units are loaded, the build system copied the input .qrc file to a new one. That mere copying caused the build to break when the copied .qrc file was not in the same directory as the original one, as file paths within the .qrc file are interpreted as relative to the .qrc file, which was now in a different location. To fix this, this patch brings back the "filtering" code that rewrites the paths to the source files in the .qrc file. Fixes: QTBUG-78253 Change-Id: Ie1d56f3248e713a964260bc2da37c9374f7b6a36 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | | | Fix *.js files disappearing from RESOURCES when not using QtQmlSimon Hausmann2019-09-091-11/+7
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQml][Important Behavior Changes] Using the Qt Quick Compiler would exclude the original .qml files from the resource system. This made it impossible to change the Qt library binary later as the program binary was tied the to the exact Qt version. In addition sometimes unrelated files (QTBUG-73669) were removed. For the latter scenario, retain and skip options were added for the Qt Quick Compiler. In Qt 5.15 the Qt Quick Compiler does not remove the input files anymore. All files are retained and the compiler merely adds the more efficient binary representation to the application. Task-number: QTBUG-73669 Change-Id: I5a523bfc69d4f48a1451bd880616c82fd73b8d15 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | | Rename alias resource propertiesLeander Beernaert2019-08-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename all alias resource properteis to QT_RESOURCE_ALIAS to match the latest changes in qtbase. Add special case to install_cmake since it doesn't have any cmake files in that directory. Change-Id: Icf78ed1e126daa149b62aa418fd5f7ad8579e2bc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | Add QtDeclarative Test CoverageLeander Beernaert2019-08-141-0/+125
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All tests compile and run on a developer build. These tests are failing: tst_qqmlsqldatabase Fails due to missing sql driver tst_qqmlsqldatabase Fails in wip/qt6 tst_ququicklayouts Fails in wip/qt6 tst_flickableinterop Fails in wip/qt6 tst_qquickpinchandler Fails in wip/qt6 tst_qquickflickable Fails in wip/qt6 tst_qquickgridview Fails in wip/qt6 tst_qquickimage Fails due to missing jpeg plugin tst_qquicklistview Fails in wip/qt6 tst_qquicktext Fails in wip/qt6 tst_qquickcanvasitem Fails in wip/qt6 tst_scenegraph Fails due to missing jpeg plugin tst_TestFiltering Fails in wip/qt6 Change-Id: I4b9d69c118e23c095cb72ad5a67653fc30943bb1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* / / Split qqmltypeloader{_p.h|.cpp} into a several filesUlf Hermann2019-07-111-0/+1
|/ / | | | | | | | | | | | | No one can read this mess. Change-Id: Icec4f2afc466435c1ae5e4e80fa2c1b5baf7d087 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-2520-38/+105
|\| | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qmltest/quicktest.cpp tests/auto/qml/qmlcachegen/qmlcachegen.pro Change-Id: I70e96e8817d59647f876b8b77b30cdeede8f0662
| * Initialize TranslationData padding before writing cache filesUlf Hermann2019-03-2118-36/+103
| | | | | | | | | | | | | | | | Otherwise the resulting files differ subtly. Fixes: QTBUG-74532 Change-Id: I12b4f1ba6dda781d63ad50cce87861ba24582bf7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add option to retain sources when generating QML cacheUlf Hermann2019-01-044-0/+18
|/ | | | | | | | | | | By default any .qrc files are filtered and QML and JS sources dropped when generating the cache. The new QTQUICK_COMPILER_RETAINED_RESOURCES option allows the specification of .qrc files to be kept as they are. The source fils specified in them will be available to the application. Change-Id: If45bcd95c29fe4b91f5817573964ff55b1db8a00 Fixes: QTBUG-72430 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix translation bindings when qtquickcompiler is usedFrederik Gladhorn2018-11-061-1/+18
| | | | | | | | | | | | | | It turns out that the context information is lost when using the compiler. The unit->unitData()->sourceFileIndex is wrong (always 0), which should probably be fixed. This change only works around that by using unit->fileName(); instead. Make sure that the test actually verifies translations happen and have a context. Done-with: Jan Arve Sæther Fixes: QTBUG-71553 Change-Id: Ib5926bd4b9a6267644f5c9328a84c23d61ca5466 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add support for compiling ES modules ahead of timeSimon Hausmann2018-08-174-0/+43
| | | | | | | | | | | | This is also pretty straight-forward by adding .mjs as supported extension in the qmake and cmake support. This also tweaks qv4engine.cpp to share the same module compilation function across all code paths. Change-Id: Ia0e23c78a794f2330ecf8f991ee6ea948f4ac89d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Reduce memory consumption when loading AOT generated cache filesSimon Hausmann2018-08-011-10/+7
| | | | | | | | | | | | | | | | | Separate the qml data (objects/imports) from the general compilation unit data. It's only the former that needs to be re-generated as part of the type re-compilation and by separating it we can allocate memory just for that and keep using the mmap'ed general unit data for everything else (including byte code). Another upside of this change is that it allows eliminating the recently introduced concept of a backing unit again. Saves ~149K RAM with the QQC1 gallery. Task-number: QTBUG-69588 Change-Id: Ie88a4286feb7e2f472f58a28fa5dd6ff0a91c4b6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Simplify signal handler parameter handlingSimon Hausmann2018-07-311-7/+3
| | | | | | | | | | | | | | | | | | | | | | Unify the two QQmlBoundSignalExpression constructors and always call updateInternalClass on the run-time function to set up the parameter name -> argument mapping. This streamlines the code, shares the error handling for unnamed parameter clashes and allows getting rid of the code to extend the formals of functions that become signal handlers in AOT generated cache files. Either onThatSignal: function(param1, param2) { ... } syntax is used and the mapping is fixed and known at AOT/compile time. Or alternatively the dynamic variant is used where the formals are determined at signal handler installation time. Saves a whopping KB of RAM on the QQC1 gallery. Change-Id: I33a9afc06474143d7893f42366cb6553a07ce937 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Optimize memory consumption of ahead-of-time compile cache filesSimon Hausmann2018-07-311-0/+10
| | | | | | | | | | | | | | | When loading a pre-compiled cache file, the strings contained therein will remain available in memory since commit 7dcada48d2435e8ceb0cc8a6771f79b76979e11f. While for aot built cache files we may have to add new strings (for example for signal handler parameters), we can re-use the existing strings by omitting them from the intermediately created string table. This saves ~283K RAM with qtquickcontrols1 gallery. Task-number: QTBUG-69588 Change-Id: I8ea807f6dea4cc35d8b7e5f7329809ed1cd12880 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Reduce memory usage when loading QML files from AOT generated cachesSimon Hausmann2018-07-311-0/+25
| | | | | | | | | | | | When we have to modify the string table, we should make sure to discard the old one for the new CompiledData::Unit we hold in memory. This also allows discarding the old QML tables as they'll be rewritten anyway. Saves about ~402K RAM with qtquickcontrols1 gallery. Task-number: QTBUG-69588 Change-Id: Iae3e9fe2578ea8cb7ec1859ce660f75cfb388dee Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix import of precompiled .js filesSimon Hausmann2018-07-311-2/+72
| | | | | | | | | | | Loading those must not fail the file relocation test, so set the source file names to empty, as we also do for .qml files. Also added tests for all the scenarios: no embedded file paths for AOT files but absolute paths for run-time created cache files. Change-Id: I3fc92e89cfd0da512afeac22bd0da3e915ec46ea Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Encapsulate the unit data in CompilationUnitSimon Hausmann2018-07-311-2/+3
| | | | | | | | This allows updating the constants table when the unit data is set / changes and removes the tie to the engine. Change-Id: Ice553650390589e30e18421c4e55422a55d0df89 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Try to load QML cache from CacheLocation if side-by-side failsThiago Macieira2018-07-271-0/+8
| | | | | | | | | This could happen if the .qmlc file is stale or corrupt for some reason. In that case, we should try to load a cache file from the user's CacheLocation. Change-Id: Id2be776c7ae0467c9d9ffffd1543204272a531d1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Clarify error message when using eval in signal handlersSimon Hausmann2018-06-281-1/+1
| | | | | | Task-number: QTBUG-64024 Change-Id: If8f749ef9ec072928cb352ad7cd4dcf140b6ed53 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix CONFIG+=qtquickcompiler with umlauts in the file pathSimon Hausmann2018-06-197-4/+40
| | | | | | | | | | | | | | | Instead of replacing every character that is not allowed in C++ identifiers with an underscore (which in turn could lead to collissions), replace it with the hexadecimal value of the offending character's unicode value. In addition we must use the complete suffix when mapping Foo.qml to Foo_qml.cpp. Task-number: QTBUG-68608 Started-by: Erik Verbruggen <erik.verbruggen@qt.io> Change-Id: I7e2153f0e6671b37dcaee4efb9aaae1d9b230f0c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Ensure we restore QML-defined enumsMichael Brasser2018-05-233-0/+22
| | | | | | | | | | | | 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-115-0/+29
| | | | | | | | | | | | | | | | | 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-274-0/+25
| | | | | | | | 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-203-0/+52
| | | | | | | | | | | | | | | | | | 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>
* Handle function expressions as signal handlersErik Verbruggen2018-03-201-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two ways to use function expressions on the right-hand side of bindings: property var somethingPressed somethingPressed: function() { /* ..press something else.. */ } signal buttonPressed onButtonPressed: function() { /* ..handle buttonPress.. */ } In the former case, it declares a property that holds a function. So on initialization, the right-hand side of the binding returns a closure that gets assigned to the property 'somethingPressed'. In the latter case, the signal handler is explicitly marked as a function for clarity. So, the handler should not be returning the closure, but the handler should *be* the closure. In general, it is not possible to detect if the left-hand side is a property or a signal handler when generating QML cache files ahead of time. So for this case, we mark the function as only returning a closure. Then when instantiating the object, we check if it is a signal handler, and if the handler is marked as only returning a closure. If so, we set that closure to be the signal handler. Task-number: QTBUG-57043 Task-number: QTBUG-50328 Change-Id: I3008ddd847e30b7d0adef07344a326f84d85f1ba Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-121-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/shapes/qquickshape.cpp src/imports/shapes/qquickshape_p_p.h src/qml/compiler/qqmlpropertycachecreator_p.h src/qml/jsruntime/qv4value_p.h src/quick/items/qquickloader_p.h tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp tools/qmlprofiler/qmlprofilerapplication.cpp Change-Id: Iafc66ae84bf78630ed72a986acb678e9d19e3a69
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-02-021-0/+18
| |\ | | | | | | | | | Change-Id: I41ca9120a470a905c2f5c168c1de4cf970fa0fff
| | * Fix memory leak with QtQuick compiler generated filesSimon Hausmann2018-02-021-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When for the QQC code path we do QML type re-compilation, we allocate a new QV4::CompiledData::Unit. We must make sure that this dynamically allocated memory is released in QV4::CompiledData::CompilationUnit's destructor, by ensuring that the StaticData flag is not set. This isn't directly applicable to the ahead-of-time generated cache file unit data as they will always be re-generated (and thus the unsetting of StaticData at the end of createCompilationUnit::createUnitData()), but I've added a test-case nevertheless to ensure the correct engine behavior. Change-Id: I16973d7989567892bf8bf9dd6214bf293055d260 Reviewed-by: Lars Knoll <lars.knoll@qt.io>