From 84ae970c6da25e3a0cdee3a477ec8c6f9510778f Mon Sep 17 00:00:00 2001 From: Mate Barany Date: Tue, 20 Sep 2022 18:11:23 +0200 Subject: [PATCH] qdbusxml2cpp: Modify return values Addressing a comment from the review of QTBUG-98434. Instead of creating a QL1SV from the concatenation, create the QL1SV first and concatenate after, using QStringBuilder. Task-number: QTBUG-103100 Change-Id: Ic082da410db15dd9e2c341711c24150d7a0dc0c2 Reviewed-by: Marc Mutz --- src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp index 1da650a340..7033529326 100644 --- a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp +++ b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp @@ -268,7 +268,7 @@ static QByteArray qtTypeName(const QString &where, const QString &signature, static QString nonConstRefArg(const QByteArray &arg) { - return QLatin1StringView(arg + " &"); + return QLatin1StringView(arg) + " &"_L1; } static QString templateArg(const QByteArray &arg) @@ -276,13 +276,13 @@ static QString templateArg(const QByteArray &arg) if (!arg.endsWith('>')) return QLatin1StringView(arg); - return QLatin1StringView(arg + ' '); + return QLatin1StringView(arg) + " "_L1; } static QString constRefArg(const QByteArray &arg) { if (!arg.startsWith('Q')) - return QLatin1StringView(arg + ' '); + return QLatin1StringView(arg) + " "_L1; else return "const %1 &"_L1.arg(QLatin1StringView(arg)); }