diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2017-03-22 11:49:14 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2017-03-22 12:33:30 +0000 |
commit | 047af776233d39905e8ad2b8411fcf6d3cf0d22f (patch) | |
tree | 229c34e6004b864c25535faeb1d63f88e8f2634d /src/qml | |
parent | 110f69ab8168950be74779b635d46ef83553d71a (diff) | |
download | qtdeclarative-047af776233d39905e8ad2b8411fcf6d3cf0d22f.tar.gz |
Codegen: do not assume QStringRef(const QString *) is implicit
It won't be for very much longer.
Change-Id: I90fae21b621f104053b776296fc9f6525e8baf52
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index 2c1b5c57cc..a10c0730bf 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -1485,7 +1485,7 @@ IR::Expr *Codegen::identifier(const QString &name, int line, int col) IR::Function *f = _function; while (f && e->parent) { - if (f->insideWithOrCatch || (f->isNamedExpression && f->name == name)) + if (f->insideWithOrCatch || (f->isNamedExpression && QStringRef(f->name) == name)) return _block->NAME(name, line, col); int index = e->findMember(name); @@ -1496,7 +1496,7 @@ IR::Expr *Codegen::identifier(const QString &name, int line, int col) al->isArgumentsOrEval = true; return al; } - const int argIdx = f->indexOfArgument(&name); + const int argIdx = f->indexOfArgument(QStringRef(&name)); if (argIdx != -1) return _block->ARG(argIdx, scope); |