diff options
| author | Anton Kudryavtsev <anton.kudryavtsev@vk.team> | 2023-09-13 15:46:18 +0300 |
|---|---|---|
| committer | Anton Kudryavtsev <anton.kudryavtsev@vk.team> | 2023-09-15 13:04:18 +0300 |
| commit | df66aa688c471980ab664401ecf387ada9b61e3d (patch) | |
| tree | 964f14c0bba227ca20d90a2ac8cc1b726d049727 /src/qml/jsruntime/qv4setobject.cpp | |
| parent | cc2de22ec2f90bc47f97ab4f9190c37942f6302c (diff) | |
qml: replace fromLatin with _L1
to improve readability and reduce allocations
Change-Id: I1ffe10d6a14fb9cc09dd438cca84f4a1d74b8cb8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4setobject.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4setobject.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4setobject.cpp b/src/qml/jsruntime/qv4setobject.cpp index 01fc62a4d4..a7589a40db 100644 --- a/src/qml/jsruntime/qv4setobject.cpp +++ b/src/qml/jsruntime/qv4setobject.cpp @@ -8,6 +8,7 @@ #include "qv4symbol_p.h" using namespace QV4; +using namespace Qt::Literals::StringLiterals; DEFINE_OBJECT_VTABLE(SetCtor); DEFINE_OBJECT_VTABLE(WeakSetCtor); @@ -37,7 +38,7 @@ ReturnedValue WeakSetCtor::construct(const FunctionObject *f, const Value *argv, if (argc > 0) { ScopedValue iterable(scope, argv[0]); if (!iterable->isUndefined() && !iterable->isNull()) { - ScopedFunctionObject adder(scope, a->get(ScopedString(scope, scope.engine->newString(QString::fromLatin1("add"))))); + ScopedFunctionObject adder(scope, a->get(ScopedString(scope, scope.engine->newString(u"add"_s)))); if (!adder) return scope.engine->throwTypeError(); ScopedObject iter(scope, Runtime::GetIterator::call(scope.engine, iterable, true)); |
