aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.lima@openbossa.org>2010-05-19 14:43:12 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:02 -0300
commitea82a7c78ebd0ecfb5f7f771cc5cd777e06b3d5c (patch)
treefdd9d514dc6cab2de55149b93a96b25665248d85
parentaeecb5f46be002dce7b80182e8c067f553a67486 (diff)
When the class is a alias for a template class, copy all properties from the base class.
-rw-r--r--abstractmetabuilder.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/abstractmetabuilder.cpp b/abstractmetabuilder.cpp
index 6e6a4a6e6..5bb22afc1 100644
--- a/abstractmetabuilder.cpp
+++ b/abstractmetabuilder.cpp
@@ -2157,6 +2157,16 @@ bool AbstractMetaBuilder::inheritTemplate(AbstractMetaClass *subclass,
QList<TypeParser::Info> targs = info.template_instantiations;
QList<AbstractMetaType *> templateTypes;
+ if (subclass->isTypeAlias()) {
+ subclass->setHasCloneOperator(templateClass->hasCloneOperator());
+ subclass->setHasEqualsOperator(templateClass->hasEqualsOperator());
+ subclass->setHasHashFunction(templateClass->hasHashFunction());
+ subclass->setHasNonPrivateConstructor(templateClass->hasNonPrivateConstructor());
+ subclass->setHasPrivateDestructor(templateClass->hasPrivateDestructor());
+ subclass->setHasProtectedDestructor(templateClass->hasProtectedDestructor());
+ subclass->setHasVirtualDestructor(templateClass->hasVirtualDestructor());
+ }
+
foreach (const TypeParser::Info &i, targs) {
QString typeName = i.qualified_name.join("::");
QStringList possibleNames;