aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2016-10-21 14:15:52 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2016-10-21 12:33:43 +0000
commit2eda16de8857b739b1d24e9137292301d2191275 (patch)
tree3f33bed84ad91e44ae1c9a83c3781bdf84de6cbf /src
parentd1d1b689ee483004bbf8a65684e785f70319118e (diff)
Fix bootstrap and qtquick compiler build
We need to always include the checksum generating code, even if dummy (for the lack of the md5 code being in the bootstrap library). Change-Id: I3dd9c585a23ffea9bd7c79dbe6dae29b9f93fa6d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/compiler/qv4compileddata.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp
index 81acc71717..e815c41a86 100644
--- a/src/qml/compiler/qv4compileddata.cpp
+++ b/src/qml/compiler/qv4compileddata.cpp
@@ -654,8 +654,11 @@ bool ResolvedTypeReferenceMap::addToHash(QCryptographicHash *hash, QQmlEngine *e
return true;
}
+#endif
+
void Unit::generateChecksum()
{
+#ifndef V4_BOOTSTRAP
QCryptographicHash hash(QCryptographicHash::Md5);
const int checksummableDataOffset = qOffsetOf(QV4::CompiledData::Unit, md5Checksum) + sizeof(md5Checksum);
@@ -666,9 +669,10 @@ void Unit::generateChecksum()
QByteArray checksum = hash.result();
Q_ASSERT(checksum.size() == sizeof(md5Checksum));
memcpy(md5Checksum, checksum.constData(), sizeof(md5Checksum));
-}
-
+#else
+ memset(md5Checksum, 0, sizeof(md5Checksum));
#endif
+}
}