aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compileddata.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-05-06 13:21:17 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-05-08 13:23:20 +0000
commitae8c798a0a01334d1af33a59acdaeda8898a9f5c (patch)
tree375a4e67627c599c4997e7561a99f07d865f7431 /src/qml/compiler/qv4compileddata.cpp
parent12829b50fc85587c9c08c834efd63ebe8ccbbcd2 (diff)
Drop some dead bootstrap code
The dependencies are only hashed if a dependencyHasher is given. This is generally not the case when compiling ahead of time. There is also no need to hide the declaration of DependentTypesHasher from the bootstrap code. Change-Id: I0ea74c3079656ce1fe353956999820916c8ff626 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compileddata.cpp')
-rw-r--r--src/qml/compiler/qv4compileddata.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp
index a78094f17c..5f2993c364 100644
--- a/src/qml/compiler/qv4compileddata.cpp
+++ b/src/qml/compiler/qv4compileddata.cpp
@@ -425,13 +425,10 @@ bool CompilationUnit::verifyChecksum(const DependentTypesHasher &dependencyHashe
}
return true;
}
- QCryptographicHash hash(QCryptographicHash::Md5);
- if (!dependencyHasher(&hash))
- return false;
- QByteArray checksum = hash.result();
- Q_ASSERT(checksum.size() == sizeof(data->dependencyMD5Checksum));
- return memcmp(data->dependencyMD5Checksum, checksum.constData(),
- sizeof(data->dependencyMD5Checksum)) == 0;
+ const QByteArray checksum = dependencyHasher();
+ return checksum.size() == sizeof(data->dependencyMD5Checksum)
+ && memcmp(data->dependencyMD5Checksum, checksum.constData(),
+ sizeof(data->dependencyMD5Checksum)) == 0;
}
QStringList CompilationUnit::moduleRequests() const