aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnton Kudryavtsev <[email protected]>2023-09-13 15:59:08 +0300
committerAnton Kudryavtsev <[email protected]>2023-09-15 13:04:18 +0300
commitee5291afc3ac64faea06575bb7101411ff45ea3b (patch)
treeefd4dbf983e3da27c68bb7319a16d4664a7da6b3 /src
parentdf66aa688c471980ab664401ecf387ada9b61e3d (diff)
qml: use QSL less
prefer _L1 where it's possible Change-Id: I3f3e1ccc985f6eb93ff2150825cae891add5dba1 Reviewed-by: Ulf Hermann <[email protected]> Reviewed-by: Shawn Rutledge <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/qml/jsruntime/qv4propertykey.cpp6
-rw-r--r--src/qml/qml/qqmlpropertybinding.cpp4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4propertykey.cpp b/src/qml/jsruntime/qv4propertykey.cpp
index ac03e01a73..d93ff8e794 100644
--- a/src/qml/jsruntime/qv4propertykey.cpp
+++ b/src/qml/jsruntime/qv4propertykey.cpp
@@ -8,6 +8,8 @@
#include <qv4engine_p.h>
#include <qv4scopedvalue_p.h>
+using namespace Qt::Literals::StringLiterals;
+
QV4::Heap::StringOrSymbol *QV4::PropertyKey::toStringOrSymbol(QV4::ExecutionEngine *e)
{
if (isArrayIndex())
@@ -56,9 +58,9 @@ QV4::Heap::String *QV4::PropertyKey::asFunctionName(ExecutionEngine *engine, Fun
{
QString n;
if (prefix == Getter)
- n = QStringLiteral("get ");
+ n += "get "_L1;
else if (prefix == Setter)
- n = QStringLiteral("set ");
+ n += "set "_L1;
if (isArrayIndex())
n += QString::number(asArrayIndex());
else {
diff --git a/src/qml/qml/qqmlpropertybinding.cpp b/src/qml/qml/qqmlpropertybinding.cpp
index 5f646b62de..c8a7e6256a 100644
--- a/src/qml/qml/qqmlpropertybinding.cpp
+++ b/src/qml/qml/qqmlpropertybinding.cpp
@@ -16,6 +16,8 @@
QT_BEGIN_NAMESPACE
+using namespace Qt::Literals::StringLiterals;
+
Q_LOGGING_CATEGORY(lcQQPropertyBinding, "qt.qml.propertybinding");
QUntypedPropertyBinding QQmlPropertyBinding::create(const QQmlPropertyData *pd, QV4::Function *function,
@@ -279,7 +281,7 @@ QString QQmlPropertyBinding::createBindingLoopErrorDescription()
Q_ASSERT(propertyData);
Q_ASSERT(!targetIndex().hasValueTypeIndex());
QQmlProperty prop = QQmlPropertyPrivate::restore(target(), *propertyData, &valueTypeData, nullptr);
- return QStringLiteral(R"(QML %1: Binding loop detected for property "%2")").arg(QQmlMetaType::prettyTypeName(target()) , prop.name());
+ return R"(QML %1: Binding loop detected for property "%2")"_L1.arg(QQmlMetaType::prettyTypeName(target()) , prop.name());
}
void QQmlPropertyBinding::bindingErrorCallback(QPropertyBindingPrivate *that)