summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMate Barany <[email protected]>2022-09-20 17:46:35 +0200
committerMate Barany <[email protected]>2022-09-23 13:53:27 +0200
commitc2df659c8d1a1a115eb2364ee883957ff6d86664 (patch)
tree856867a19216e73aba86a7c223fdaf220be4c6b9
parent67de96852d2c30ca241740c4b45d1414f540dc32 (diff)
qdbusxml2cpp: Fix mismatches between strings and string literals
Addressing some remarks made during the review of QTBUG-98434. Fix the mismatches between strings and string literals. Task-number: QTBUG-103100 Change-Id: I3a7d2574f55fcffa81b8c87fb510aba0a8853330 Reviewed-by: Marc Mutz <[email protected]>
-rw-r--r--src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
index 82556ebae7a..fe5649f5aff 100644
--- a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
+++ b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
@@ -299,7 +299,7 @@ static QStringList makeArgNames(const QDBusIntrospection::Arguments &inputArgs,
const QDBusIntrospection::Argument &arg = inputArgs.at(i);
QString name = arg.name;
if (name.isEmpty())
- name = QString( "in%1"_L1 ).arg(i);
+ name = u"in%1"_s.arg(i);
else
name.replace(u'-', u'_');
while (retval.contains(name))
@@ -310,7 +310,7 @@ static QStringList makeArgNames(const QDBusIntrospection::Arguments &inputArgs,
const QDBusIntrospection::Argument &arg = outputArgs.at(i);
QString name = arg.name;
if (name.isEmpty())
- name = QString( "out%1"_L1 ).arg(i);
+ name = u"out%1"_s.arg(i);
else
name.replace(u'-', u'_');
while (retval.contains(name))
@@ -481,7 +481,7 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
if (pos != -1)
includeGuard = includeGuard.mid(pos + 1);
} else {
- includeGuard = "QDBUSXML2CPP_PROXY"_L1;
+ includeGuard = u"QDBUSXML2CPP_PROXY"_s;
}
includeGuard = "%1"_L1.arg(includeGuard);
hs << "#ifndef " << includeGuard << Qt::endl
@@ -798,7 +798,7 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
if (pos != -1)
includeGuard = includeGuard.mid(pos + 1);
} else {
- includeGuard = "QDBUSXML2CPP_ADAPTOR"_L1;
+ includeGuard = u"QDBUSXML2CPP_ADAPTOR"_s;
}
includeGuard = "%1"_L1.arg(includeGuard);
hs << "#ifndef " << includeGuard << Qt::endl
@@ -845,7 +845,7 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
QString parent = parentClassName;
if (parentClassName.isEmpty())
- parent = "QObject"_L1;
+ parent = u"QObject"_s;
for (const QDBusIntrospection::Interface *interface : interfaces) {
QString className = classNameForInterface(interface->name, Adaptor);
@@ -1173,8 +1173,7 @@ int main(int argc, char **argv)
QStringList args = app.arguments();
args.removeFirst();
- commandLine = PROGRAMNAME " "_L1;
- commandLine += args.join(u' ');
+ commandLine = PROGRAMNAME " "_L1 + args.join(u' ');
if (!proxyFile.isEmpty() || adaptorFile.isEmpty())
writeProxy(proxyFile, interfaces);