summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/generator.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-11-30 11:06:57 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-11-30 11:29:18 (GMT)
commit0d09c6bfa5da53fedc794d6dc99f5675bdf59d49 (patch)
tree1066531735766690ee8c711ce938d3f9e14f7bf7 /src/tools/moc/generator.cpp
parent1d5621a4958ab6f250566c26f891d3e99c6f8585 (diff)
downloadQt-0d09c6bfa5da53fedc794d6dc99f5675bdf59d49.zip
Qt-0d09c6bfa5da53fedc794d6dc99f5675bdf59d49.tar.gz
Qt-0d09c6bfa5da53fedc794d6dc99f5675bdf59d49.tar.bz2
Do not recoginze templated types or pointers as flags.
Those types can never by flags. This fixes QML as they do not use Q_DECLARE_METATYPE in a way visible to moc. Patch by Aaron Kennedy Reviewed-by: Kent Hansen
Diffstat (limited to 'src/tools/moc/generator.cpp')
-rw-r--r--src/tools/moc/generator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index 1ed6586..8fcc0df 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -292,7 +292,8 @@ void Generator::generateCode()
QList<QByteArray> extraList;
for (int i = 0; i < cdef->propertyList.count(); ++i) {
const PropertyDef &p = cdef->propertyList.at(i);
- if (!isVariantType(p.type) && !metaTypes.contains(p.type)) {
+ if (!isVariantType(p.type) && !metaTypes.contains(p.type) && !p.type.contains('*') &&
+ !p.type.contains('<') && !p.type.contains('>')) {
int s = p.type.lastIndexOf("::");
if (s > 0) {
QByteArray scope = p.type.left(s);