diff options
Diffstat (limited to 'src/tools/moc')
-rw-r--r-- | src/tools/moc/generator.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index 5178e90471..39640b6f68 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -164,7 +164,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)); } @@ -174,7 +175,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 |