diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2018-07-20 09:22:47 -0700 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-07-27 04:56:14 +0000 |
commit | 447e2e024609a22fe052cf458c27efdef2e3d3eb (patch) | |
tree | f2665cfdea84b9d85044a3221658eb8ce10e7d9a /src/qml/compiler/qv4compileddata_p.h | |
parent | 65fd9165162a8498c5bbe71e5372b65770c240b0 (diff) |
Try to load QML cache from CacheLocation if side-by-side fails
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>
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index c1be00ea27..0ac40d2800 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -752,7 +752,9 @@ struct Import }; static_assert(sizeof(Import) == 24, "Import structure needs to have the expected size to be binary compatible on disk when generated by host compiler and loaded by target"); +enum { QmlCompileHashSpace = 48 }; static const char magic_str[] = "qv4cdata"; +extern const char qml_compile_hash[QmlCompileHashSpace + 1]; struct Unit { @@ -764,7 +766,7 @@ struct Unit quint32_le unitSize; // Size of the Unit and any depending data. // END DO NOT CHANGE THESE FIELDS EVER - char libraryVersionHash[48]; + char libraryVersionHash[QmlCompileHashSpace]; char md5Checksum[16]; // checksum of all bytes following this field. void generateChecksum(); |