diff options
author | Bart Vanhauwaert <bart.vanhauwaert@grafitroniks.fr> | 2016-11-22 10:25:52 +0100 |
---|---|---|
committer | Bart Vanhauwaert <bart.vanhauwaert@grafitroniks.fr> | 2016-11-23 11:40:19 +0100 |
commit | 767cf0e442723488fc4fd60154ff3a84193bf648 (patch) | |
tree | a1a3b65e68b1dde2d7f0882c55b78f9b6b5af53a | |
parent | Exclude QTextStream::operator<<(*) from generation (diff) | |
download | qtscriptgenerator-767cf0e442723488fc4fd60154ff3a84193bf648.tar.xz qtscriptgenerator-767cf0e442723488fc4fd60154ff3a84193bf648.zip |
Exclude QList<QModelIndex> from Q_DECLARE_METATYPE
Special case QList<QModelIndex> to avoid Q_DECLARE_METATYPE it since it
creates conflicts. Copied the WTF specifier for this code from the
other special case for QStringList<QString>. May need to revisit this
issue.
-rw-r--r-- | generator/classgenerator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/generator/classgenerator.cpp b/generator/classgenerator.cpp index 5d10558..7644bec 100644 --- a/generator/classgenerator.cpp +++ b/generator/classgenerator.cpp @@ -1058,6 +1058,10 @@ void maybeDeclareMetaType(QTextStream &stream, const QString &typeName, if (nameFootPrint == QLatin1String("QStringList<QString>")) { return; // ### wtf... } + if (nameFootPrint == QLatin1String("QList<QModelIndex>")) { + return; // ### wtf2... + } + if (registeredTypeNames.contains(nameFootPrint) || (QMetaType::type(name.toLatin1()) != 0)) return; |