aboutsummaryrefslogtreecommitdiffstats
path: root/abstractmetalang.cpp
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-04-06 18:17:59 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:16 -0300
commit2ee4fa594678cfd2e3b874ef7235d410e6126da0 (patch)
treed8ff8783739510c6abb1983606d9ccb290d735bf /abstractmetalang.cpp
parent988de2f105e30e59c5df649ce6d46f9f66a211d8 (diff)
Skip functions added on base classes.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'abstractmetalang.cpp')
-rw-r--r--abstractmetalang.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/abstractmetalang.cpp b/abstractmetalang.cpp
index 24aaa68b..509a7c1d 100644
--- a/abstractmetalang.cpp
+++ b/abstractmetalang.cpp
@@ -1338,7 +1338,7 @@ void AbstractMetaClass::addFunction(AbstractMetaFunction *function)
{
Q_ASSERT(!function->signature().startsWith("("));
function->setOwnerClass(this);
-
+
if (!function->isDestructor())
m_functions << function;
else
@@ -1981,6 +1981,10 @@ void AbstractMetaClass::fixFunctions()
if (sf->isRemovedFromAllLanguages(sf->implementingClass()))
continue;
+ // skip functions added in base classes
+ if (sf->isUserAdded() && sf->declaringClass() != this)
+ continue;
+
// we generally don't care about private functions, but we have to get the ones that are
// virtual in case they override abstract functions.
bool add = (sf->isNormal() || sf->isSignal() || sf->isEmptyFunction());
@@ -1989,6 +1993,7 @@ void AbstractMetaClass::fixFunctions()
if (f->isRemovedFromAllLanguages(f->implementingClass()))
continue;
+
uint cmp = f->compareTo(sf);
if (cmp & AbstractMetaFunction::EqualModifiedName) {