aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmldiskcache
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix interaction of files selectors with disk cachingSimon Hausmann2016-08-041-0/+52
| | | | | | | | Make sure to save the .qmlc/.jsc files to the location determined by the file selectors. Change-Id: If535bb1e4f0d20ac692b3d8e6d563f77cd00446b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Safeguard disk cache loading with checksum verificationSimon Hausmann2016-08-041-5/+117
| | | | | | | | | | | | | | | When loading a QML component from the disk cache, compare the checksum of the dependent types against the checksum when the cache was created. Any change in the meta-object of a dependent type should trigger a re-creation discard of the cache and consequent re-creation (in the test-case). Unfortunately this also requires extending the existing hack in the unit test to deal with the low second precision on HFS+ in order to pass the tests. Change-Id: Ib8e899347680f7be676788388e9c23a09b0277e3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Improve robustness of qml disk cachingSimon Hausmann2016-07-231-7/+114
| | | | | | | | Perform various basic checks before proceeding to load an existing cache file, including the qt version, architecture, data structure version and others. Change-Id: Ie822b056e944ac120643aad260e97f62616688bf Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Add support for saving/loading the moth interpreter byte codeSimon Hausmann2016-07-211-10/+0
| | | | | | | | With the JIT and moth supporting persistence, we can enable the disk cache tests unconditionally. Change-Id: I6d6652411237001433a32a2de21d1f78f51b43ef Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Improve robustness of qml cache expiry checkingSimon Hausmann2016-07-191-0/+5
| | | | | | | | | | | Instead of relying on two time stamps in the file system (source file and cache file), make the determination on whether the source file is newer than the cache solely depend on the time stamp of only the source file. This means that when cache files are stored in archives for example their modification date does not need to be preserved upon extraction. Change-Id: I0b4362663868c6fb9bd7e106028161b2d67274d4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up implicit component registrationSimon Hausmann2016-07-151-0/+42
| | | | | | | | | | | | | When assigning an object to a property that is a QQmlComponent, we implicitly "wrap" a Component {} around the object declaration. In the QML IR this is only half-heartedly represented. In order to correctly determine dependencies later when saving and to support QML files that use implicit components but don't import QtQml or QtQuick explicitly, we must also extend the file imports accordingly. This is now done (and tested) by emulating a "import QtQml 2.0 as QmlInternals" and then using "QmlInternals.Component". Change-Id: I26f4f53a35675b52d4bd39f23359b0ac8f9678c5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix endian support in compiled data structuresSimon Hausmann2016-07-141-10/+10
| | | | | | | | | | | | The goal is to make the compiled data structures persistent on disk. In order to make it possible to create these data structures on a "host" system that may have a different endianness than the target system, we now make all the word sized fields little-endian. The template wrappers from QJson provide zero-overhead access for little-endian machines (the vast majority) while maintaining a large degree of source compatibility. Change-Id: I3d30da1fcf3bffb98dbe9337d3a35482fb7b57c8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Added basic support for saving compilation units to diskSimon Hausmann2016-06-172-0/+189
Hidden behind a QML_DISK_CACHE=1 environment variable we will now attempt to save a binary representation of the type compilation for Foo.qml next to it called Foo.qmlc. Change-Id: I27e800b50cdb186669256fd277578ea1f1e70513 Reviewed-by: Lars Knoll <lars.knoll@qt.io>