diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2016-07-29 16:20:19 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-08-02 16:17:25 +0000 |
commit | 546679658ed0a39f758a9dcfad8f16a6552da7fa (patch) | |
tree | 021ec1c0af4c0952cda38765d3683c5c714d8db5 /src/qml/compiler/qv4compileddata.cpp | |
parent | d8198f2a16c97924700cdf96997d40dfac28917e (diff) | |
download | qtdeclarative-546679658ed0a39f758a9dcfad8f16a6552da7fa.tar.gz |
Don't save compilation units to disk that don't orignate from files
It's asking for trouble and we have no way of verifying that the source
changed.
Change-Id: I2ae2e975ef52142b8a6821b23f99ab3517ae3d49
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compileddata.cpp')
-rw-r--r-- | src/qml/compiler/qv4compileddata.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp index 83ae9c56df..121b5907db 100644 --- a/src/qml/compiler/qv4compileddata.cpp +++ b/src/qml/compiler/qv4compileddata.cpp @@ -291,6 +291,11 @@ bool CompilationUnit::saveToDisk(QString *errorString) { errorString->clear(); + if (data->sourceTimeStamp == 0) { + *errorString = QStringLiteral("Missing time stamp for source file"); + return false; + } + const QUrl unitUrl = url(); if (!unitUrl.isLocalFile()) { *errorString = QStringLiteral("File has to be a local file."); |