aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-03-09 16:40:38 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2018-03-20 09:44:11 +0000
commit64e90f393146dadb382d154e7d67a9109ab2492a (patch)
treec1079ff6af2c9fca9357a9313fffe5590e30dfce /tests/auto/qml/qqmlecmascript
parent22b13921f8067f8a93164875a4ad59bed85b0400 (diff)
Fix QML data structure version checking for ahead-of-time generated files
We must also do version checking for QML and JS files that were compiled ahead of time and are embedded in resources. If the lookup for the original source code fails, then we must generate an appropriate error message. As an upside we get better error reporting when trying to load an empty file and Qt.include() now reports the error message in the statusText field. The error reporting for imported scripts was not changed as importing an empty script is (oddly) allowed. Task-number: QTBUG-66986 Change-Id: Ie0ef81af371a51ecf8c66ae7954d43f5cc6c12de Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript')
-rw-r--r--tests/auto/qml/qqmlecmascript/data/include_callback.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/include_callback.js b/tests/auto/qml/qqmlecmascript/data/include_callback.js
index ea19eba300..7f3195bb1f 100644
--- a/tests/auto/qml/qqmlecmascript/data/include_callback.js
+++ b/tests/auto/qml/qqmlecmascript/data/include_callback.js
@@ -1,6 +1,6 @@
function go() {
var a = Qt.include("missing.js", function(o) { test2 = o.status == o.NETWORK_ERROR });
- test1 = a.status == a.NETWORK_ERROR
+ test1 = (a.status == a.NETWORK_ERROR) && (a.statusText.indexOf("Error opening source file") != -1);
var b = Qt.include("blank.js", function(o) { test4 = o.status == o.OK });
test3 = b.status == b.OK