From 1b10ce6a08edbc2ac7e8fd7e97e3fc691f2081df Mon Sep 17 00:00:00 2001 From: Karsten Heimrich Date: Tue, 16 Jun 2020 10:23:19 +0200 Subject: Port QtDeclarative from QStringRef to QStringView MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-84319 Change-Id: I2dcfb8a2db98282c7a1acdad1e6f4f949f26df15 Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Shawn Rutledge Reviewed-by: Timur Pocheptsov --- src/qml/jsruntime/qv4functionobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4functionobject.cpp') diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index cdb3b8942b..3f0a316af7 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -198,7 +198,7 @@ Heap::FunctionObject *FunctionObject::createBuiltinFunction(ExecutionEngine *eng Scope scope(engine); ScopedString name(scope, nameOrSymbol); if (!name) - name = engine->newString(QChar::fromLatin1('[') + nameOrSymbol->toQString().midRef(1) + QChar::fromLatin1(']')); + name = engine->newString(QChar::fromLatin1('[') + QStringView{nameOrSymbol->toQString()}.mid(1) + QChar::fromLatin1(']')); ScopedFunctionObject function(scope, engine->memoryManager->allocate(engine->rootContext(), name, code)); function->defineReadonlyConfigurableProperty(engine->id_length(), Value::fromInt32(argumentCount)); -- cgit v1.2.3