From 55b5e13e496ba035166af43ba133083d1f95bd6b Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Thu, 24 Feb 2011 11:04:59 -0300 Subject: Fixed AbstractMetaType::cppSignature() method. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed by Luciano Wolf --- abstractmetabuilder.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'abstractmetabuilder.cpp') 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; } -- cgit v1.2.3