summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2020-08-14 12:31:30 +0200
committerKarsten Heimrich <karsten.heimrich@qt.io>2020-08-14 13:11:41 +0200
commitbd17ac4f16a10604fbb44150fc5607da23ab083e (patch)
treecd149ac420aedb2b7752237e4e931e1be456e86a /tools
parent2427b675711119c6aac68b662434eb8a0910c3a3 (diff)
Fix broken build after introducing QByteArrayView
Ported from qtbase: 631127126cc14e7c01cc611532b3256b58785670 Change-Id: I33ecb4aca86a393e143f0773e6c3cf4e1e67938a Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qscxmlc/generator.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/qscxmlc/generator.cpp b/tools/qscxmlc/generator.cpp
index 49b751e..d98e4d7 100644
--- a/tools/qscxmlc/generator.cpp
+++ b/tools/qscxmlc/generator.cpp
@@ -190,7 +190,8 @@ bool Generator::registerableMetaType(const QByteArray &propertyType)
;
for (const QByteArray &smartPointer : smartPointers) {
- if (propertyType.startsWith(smartPointer + "<") && !propertyType.endsWith("&"))
+ QByteArray ba = smartPointer + "<";
+ if (propertyType.startsWith(ba) && !propertyType.endsWith("&"))
return knownQObjectClasses.contains(propertyType.mid(smartPointer.size() + 1, propertyType.size() - smartPointer.size() - 1 - 1));
}
@@ -200,7 +201,8 @@ bool Generator::registerableMetaType(const QByteArray &propertyType)
#undef STREAM_1ARG_TEMPLATE
;
for (const QByteArray &oneArgTemplateType : oneArgTemplates) {
- if (propertyType.startsWith(oneArgTemplateType + "<") && propertyType.endsWith(">")) {
+ QByteArray ba = oneArgTemplateType + "<";
+ if (propertyType.startsWith(ba) && propertyType.endsWith(">")) {
const int argumentSize = propertyType.size() - oneArgTemplateType.size() - 1
// The closing '>'
- 1