aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/dumpcodemodel
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-11-24 09:48:26 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-11-29 13:32:56 +0100
commitd37c69526fdf6cf79e8c2695c19460fbb12e833f (patch)
tree6a621924846b2e112f81628ff3d9142153055c3a /sources/shiboken6/tests/dumpcodemodel
parent51636b43d90bc29996f3bbd8372f333eb1a321d0 (diff)
shiboken6: Remove inline functions using QStringLiteral
Replace the formely used static inline QString foo() { return QStringLiteral("foo"); } by latin1 literals. Task-number: PYSIDE-2537 Change-Id: Ia4e9827e2b2a2f65f06751d549e8d79002386878 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/shiboken6/tests/dumpcodemodel')
-rw-r--r--sources/shiboken6/tests/dumpcodemodel/main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/sources/shiboken6/tests/dumpcodemodel/main.cpp b/sources/shiboken6/tests/dumpcodemodel/main.cpp
index f69d67e46..eb876634c 100644
--- a/sources/shiboken6/tests/dumpcodemodel/main.cpp
+++ b/sources/shiboken6/tests/dumpcodemodel/main.cpp
@@ -48,14 +48,14 @@ static const char *primitiveTypes[] = {
"float", "double"
};
-static inline QString nameAttribute() { return QStringLiteral("name"); }
+constexpr auto nameAttribute = "name"_L1;
static void formatXmlClass(QXmlStreamWriter &writer, const ClassModelItem &klass);
static void formatXmlEnum(QXmlStreamWriter &writer, const EnumModelItem &en)
{
writer.writeStartElement(u"enum-type"_s);
- writer.writeAttribute(nameAttribute(), en->name());
+ writer.writeAttribute(nameAttribute, en->name());
writer.writeEndElement();
}
@@ -97,7 +97,7 @@ static void formatXmlClass(QXmlStreamWriter &writer, const ClassModelItem &klass
formatXmlLocationComment(writer, klass);
writer.writeStartElement(isValueType ? u"value-type"_s
: u"object-type"_s);
- writer.writeAttribute(nameAttribute(), klass->name());
+ writer.writeAttribute(nameAttribute, klass->name());
formatXmlScopeMembers(writer, klass);
writer.writeEndElement();
}
@@ -118,7 +118,7 @@ static void startXmlNamespace(QXmlStreamWriter &writer, const NamespaceModelItem
{
formatXmlLocationComment(writer, nsp);
writer.writeStartElement(u"namespace-type"_s);
- writer.writeAttribute(nameAttribute(), nsp->name());
+ writer.writeAttribute(nameAttribute, nsp->name());
}
static void formatXmlNamespaceMembers(QXmlStreamWriter &writer, const NamespaceModelItem &nsp)
@@ -170,7 +170,7 @@ static void formatXmlOutput(const FileModelItem &dom)
QDateTime::currentDateTime().toString(Qt::ISODate));
for (auto p : primitiveTypes) {
writer.writeStartElement(u"primitive-type"_s);
- writer.writeAttribute(nameAttribute(), QLatin1StringView(p));
+ writer.writeAttribute(nameAttribute, QLatin1StringView(p));
writer.writeEndElement();
}
formatXmlNamespaceMembers(writer, dom);