diff options
-rw-r--r-- | tests/auto/qml/ecmascripttests/TestExpectations | 1 | ||||
-rw-r--r-- | tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp | 4 | ||||
-rw-r--r-- | tools/qmljs/qmljs.cpp | 3 |
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qml/ecmascripttests/TestExpectations b/tests/auto/qml/ecmascripttests/TestExpectations index d51b45b75c..dddf5ace86 100644 --- a/tests/auto/qml/ecmascripttests/TestExpectations +++ b/tests/auto/qml/ecmascripttests/TestExpectations @@ -576,7 +576,6 @@ language/expressions/tagged-template/tco-member.js strictFails language/expressions/tagged-template/template-object-frozen-non-strict.js sloppyFails language/expressions/tagged-template/template-object-frozen-strict.js strictFails language/expressions/tagged-template/template-object.js fails -language/expressions/template-literal/tv-null-character-escape-sequence.js fails language/function-code/each-param-has-own-non-shared-eval-scope.js sloppyFails language/function-code/each-param-has-own-scope.js sloppyFails language/function-code/eval-param-env-with-computed-key.js sloppyFails diff --git a/tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp b/tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp index a16f2414b0..cbe3be2e70 100644 --- a/tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp +++ b/tests/auto/qml/ecmascripttests/qjstest/test262runner.cpp @@ -494,7 +494,7 @@ void Test262Runner::writeTestExpectations() static bool executeTest(const QByteArray &data, bool runAsModule = false, const QString &testCasePath = QString(), const QByteArray &harnessForModules = QByteArray()) { - QString testData = QString::fromUtf8(data); + QString testData = QString::fromUtf8(data.constData(), data.size()); QV4::ExecutionEngine vm; @@ -514,7 +514,7 @@ static bool executeTest(const QByteArray &data, bool runAsModule = false, const QFile f(url.toLocalFile()); if (f.open(QIODevice::ReadOnly)) { QByteArray content = harnessForModules + f.readAll(); - module = vm.compileModule(url.toString(), QString::fromUtf8(content), QFileInfo(f).lastModified()); + module = vm.compileModule(url.toString(), QString::fromUtf8(content.constData(), content.length()), QFileInfo(f).lastModified()); if (vm.hasException) break; vm.injectModule(module); diff --git a/tools/qmljs/qmljs.cpp b/tools/qmljs/qmljs.cpp index 56d4a7d383..4b581fff05 100644 --- a/tools/qmljs/qmljs.cpp +++ b/tools/qmljs/qmljs.cpp @@ -146,7 +146,8 @@ int main(int argc, char *argv[]) } } if (!script) { - const QString code = QString::fromUtf8(file.readAll()); + QByteArray ba = file.readAll(); + const QString code = QString::fromUtf8(ba.constData(), ba.length()); file.close(); script.reset(new QV4::Script(ctx, QV4::Compiler::ContextType::Global, code, fn)); |