diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-11-24 09:57:27 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-11-29 13:33:00 +0100 |
commit | 482050f841492da7511932e4aaf460b839b0d5e6 (patch) | |
tree | 631676cb90176ab49829630c8db1d32a1be759e9 /sources/shiboken6/generator/shiboken/cppgenerator.cpp | |
parent | d37c69526fdf6cf79e8c2695c19460fbb12e833f (diff) |
shiboken6: Remove some further uses of QStringLiteral
Task-number: PYSIDE-2537
Change-Id: Ie71b17eec385b31842d6693b3492db565d479fd0
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/shiboken6/generator/shiboken/cppgenerator.cpp')
-rw-r--r-- | sources/shiboken6/generator/shiboken/cppgenerator.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp index aa1d587fd..a10095e04 100644 --- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp +++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp @@ -929,7 +929,7 @@ QString CppGenerator::virtualMethodReturn(TextStream &s, const ApiExtractorResul for (const FunctionModification &mod : functionModifications) { for (const ArgumentModification &argMod : mod.argument_mods()) { if (argMod.index() == 0 && !argMod.replacedDefaultExpression().isEmpty()) { - static const QRegularExpression regex(QStringLiteral("%(\\d+)")); + static const QRegularExpression regex("%(\\d+)"_L1); Q_ASSERT(regex.isValid()); QString expr = argMod.replacedDefaultExpression(); for (int offset = 0; ; ) { @@ -1581,7 +1581,7 @@ return result;)"; s << "// Python to C++ copy conversion.\n"; sourceTypeName = metaClass->name(); - targetTypeName = sourceTypeName + QStringLiteral("_COPY"); + targetTypeName = sourceTypeName + "_COPY"_L1; c.clear(); QString pyInVariable = u"pyIn"_s; @@ -2544,12 +2544,12 @@ static inline QString arrayHandleType(const AbstractMetaTypeList &nestedArrayTyp { switch (nestedArrayTypes.size()) { case 1: - return QStringLiteral("Shiboken::Conversions::ArrayHandle<") + return "Shiboken::Conversions::ArrayHandle<"_L1 + nestedArrayTypes.constLast().minimalSignature() + u'>'; case 2: - return QStringLiteral("Shiboken::Conversions::Array2Handle<") + return "Shiboken::Conversions::Array2Handle<"_L1 + nestedArrayTypes.constLast().minimalSignature() - + QStringLiteral(", ") + + ", "_L1 + QString::number(nestedArrayTypes.constFirst().arrayElementCount()) + u'>'; } @@ -4720,7 +4720,7 @@ void CppGenerator::writeGetterFunction(TextStream &s, { writeGetterFunctionStart(s, cpythonGetterFunctionName(property, context.metaClass())); writeCppSelfDefinition(s, context); - const QString value = QStringLiteral("value"); + const QString value = "value"_L1; s << "auto " << value << " = " << CPP_SELF_VAR << "->" << property.read() << "();\n" << "auto *pyResult = "; writeToPythonConversion(s, property.type(), context.metaClass(), value); |