aboutsummaryrefslogtreecommitdiffstats
path: root/abstractmetabuilder.cpp
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-02-24 11:04:59 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:15 -0300
commit55b5e13e496ba035166af43ba133083d1f95bd6b (patch)
tree940d620f3bdf14af4c108d438c3f09c45190fedf /abstractmetabuilder.cpp
parent1e2dc2d50f90f71c13f405b0a2bd82af994f7457 (diff)
Fixed AbstractMetaType::cppSignature() method.
The usage pattern *must* be decided *after* the possible template instantiations have been determined, or else the absence of such instantiations will break the caching scheme of AbstractMetaType::cppSignature(). Reviewed by Bruno Araújo <bruno.araujo@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'abstractmetabuilder.cpp')
-rw-r--r--abstractmetabuilder.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/abstractmetabuilder.cpp b/abstractmetabuilder.cpp
index 9637c81a5..e07801afa 100644
--- a/abstractmetabuilder.cpp
+++ b/abstractmetabuilder.cpp
@@ -2082,7 +2082,6 @@ AbstractMetaType* AbstractMetaBuilder::translateType(const TypeInfo& _typei, boo
metaType->setReference(typeInfo.is_reference);
metaType->setConstant(typeInfo.is_constant);
metaType->setOriginalTypeDescription(_typei.toString());
- decideUsagePattern(metaType);
foreach (const TypeParser::Info &ta, typeInfo.template_instantiations) {
TypeInfo info;
@@ -2102,6 +2101,12 @@ AbstractMetaType* AbstractMetaBuilder::translateType(const TypeInfo& _typei, boo
metaType->addInstantiation(targType, true);
}
+ // The usage pattern *must* be decided *after* the possible template
+ // instantiations have been determined, or else the absence of
+ // such instantiations will break the caching scheme of
+ // AbstractMetaType::cppSignature().
+ decideUsagePattern(metaType);
+
return metaType;
}