summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2021-02-18 17:53:47 +0100
committerMårten Nordheim <marten.nordheim@qt.io>2021-06-08 11:26:39 +0200
commitdfba0948911aecd5723c04b0bd80af19ad95bea0 (patch)
tree974df6933c11be14066f21f9b11fa5b53edb3cb2 /tools
parented38d21ae990bdc157fc411bf7df3e09905bedc4 (diff)
Use QStringLiteral in repc-generated code
This will save some copying at runtime. Change-Id: I87ada8b8afe0e6338049135d2c3c00dd3febbe1d Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/repc/repcodegenerator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/repc/repcodegenerator.cpp b/tools/repc/repcodegenerator.cpp
index a369fb3..ac58130 100644
--- a/tools/repc/repcodegenerator.cpp
+++ b/tools/repc/repcodegenerator.cpp
@@ -732,7 +732,7 @@ void RepCodeGenerator::generateClass(Mode mode, QTextStream &out, const ASTClass
}
int nPersisted = 0;
if (astClass.hasPersisted) {
- out << " QVariantList stored = retrieveProperties(\"" << astClass.name << "\", \"" << classSignature(astClass) << "\");" << Qt::endl;
+ out << " QVariantList stored = retrieveProperties(QStringLiteral(\"" << astClass.name << "\"), \"" << classSignature(astClass) << "\");" << Qt::endl;
out << " if (!stored.isEmpty()) {" << Qt::endl;
for (int i = 0; i < astClass.properties.size(); i++) {
if (astClass.properties.at(i).persisted) {
@@ -789,7 +789,7 @@ void RepCodeGenerator::generateClass(Mode mode, QTextStream &out, const ASTClass
out << " persisted << propAsVariant(" << i << ");" << Qt::endl;
}
}
- out << " persistProperties(\"" << astClass.name << "\", \"" << classSignature(astClass) << "\", persisted);" << Qt::endl;
+ out << " persistProperties(QStringLiteral(\"" << astClass.name << "\"), \"" << classSignature(astClass) << "\", persisted);" << Qt::endl;
out << " }" << Qt::endl;
} else {
out << " ~" << className << "() override = default;" << Qt::endl;