aboutsummaryrefslogtreecommitdiffstats
path: root/abstractmetabuilder.cpp
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.lima@openbossa.org>2010-04-19 15:16:10 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:00 -0300
commitba1ec45a45a197a3b1b9a3c00bd3f91a2dea13b8 (patch)
tree697ab4273f19dff78e346fe53f9c5e973e1c1804 /abstractmetabuilder.cpp
parent9800093dbfb9054354ec04a1a035b7f85f328af4 (diff)
Do not create two AbstractMetaClass for every template class.
Diffstat (limited to 'abstractmetabuilder.cpp')
-rw-r--r--abstractmetabuilder.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/abstractmetabuilder.cpp b/abstractmetabuilder.cpp
index 1d1cd07b..8e0e29cf 100644
--- a/abstractmetabuilder.cpp
+++ b/abstractmetabuilder.cpp
@@ -45,6 +45,7 @@
#include <QDir>
#include <cstdio>
+#include <algorithm>
#include "graph.h"
static QString stripTemplateArgs(const QString &name)
@@ -334,7 +335,10 @@ bool AbstractMetaBuilder::build(QIODevice* input)
fixQObjectForScope(types, model_dynamic_cast<NamespaceModelItem>(m_dom));
// Start the generation...
- QList<ClassModelItem > typeValues = typeMap.values();
+ ClassList typeValues = typeMap.values();
+ ClassList::iterator it = std::unique(typeValues.begin(), typeValues.end());
+ typeValues.erase(it, typeValues.end());
+
ReportHandler::setProgressReference(typeValues);
foreach (ClassModelItem item, typeValues) {
ReportHandler::progress("Generating class model for %s", qPrintable(item->name()));