diff options
| author | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-04-14 16:36:18 +0200 |
|---|---|---|
| committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-05-03 01:38:46 +0200 |
| commit | e65e3f3021db90ffd236f9aa4bc3dd43b89a0ec8 (patch) | |
| tree | 44bd9b1cd9e1327fc6aa3feeaa478185a493def3 /src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp | |
| parent | 39a6307178603211e070580ed0c25ec65c0b8a70 (diff) | |
Tools: replace remaining uses of QLatin1String with QLatin1StringView
Task-number: QTBUG-98434
Change-Id: Ie136f600f823019c29461561d4e30be66a66e87b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp')
| -rw-r--r-- | src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp b/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp index 914402bbbfc..cde2bef1fb2 100644 --- a/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp +++ b/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp @@ -97,7 +97,7 @@ int qDBusParametersForMethod(const FunctionDef &mm, QList<QMetaType> &metaTypes, static inline QString typeNameToXml(const char *typeName) { - QString plain = QLatin1String(typeName); + QString plain = QLatin1StringView(typeName); return plain.toHtmlEscaped(); } @@ -157,7 +157,7 @@ static QString addFunction(const FunctionDef &mm, bool isSignal = false) { const char *signature = QDBusMetaType::typeToSignature(QMetaType(types.at(j))); xml += QString::fromLatin1(" <arg %1type=\"%2\" direction=\"%3\"/>\n") .arg(name, - QLatin1String(signature), + QLatin1StringView(signature), isOutput ? "out"_L1 : "in"_L1); // do we need to describe this argument? @@ -221,9 +221,9 @@ static QString generateInterfaceXml(const ClassDef *mo) continue; retval += QString::fromLatin1(" <property name=\"%1\" type=\"%2\" access=\"%3\"") - .arg(QLatin1String(mp.name), - QLatin1String(signature), - QLatin1String(accessvalues[access])); + .arg(QLatin1StringView(mp.name), + QLatin1StringView(signature), + QLatin1StringView(accessvalues[access])); if (!QDBusMetaType::signatureToMetaType(signature).isValid()) { retval += QString::fromLatin1(">\n <annotation name=\"org.qtproject.QtDBus.QtTypeName\" value=\"%3\"/>\n </property>\n") @@ -272,7 +272,7 @@ QString qDBusInterfaceFromClassDef(const ClassDef *mo) if (cid.name == QCLASSINFO_DBUS_INTERFACE) return QString::fromUtf8(cid.value); } - interface = QLatin1String(mo->classname); + interface = QLatin1StringView(mo->classname); interface.replace("::"_L1, "."_L1); if (interface.startsWith("QDBus"_L1)) { |
