diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-11-09 01:00:06 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-11-09 01:00:07 +0100 |
commit | b01a16ea74e92c78c009f132ef7bc70e91398a98 (patch) | |
tree | fca15f247fed71ebfd67e7fda7864612190c42d9 /tools | |
parent | 6fecfdc769314162d6c909c9ae0a85631964883f (diff) | |
parent | 6c08137faf1a53db879701126608833474a2450b (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I2ed93c9d5fa8ec9b075112618a2535535591a0e8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmljs/qmljs.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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)); |