aboutsummaryrefslogtreecommitdiffstats
path: root/abstractmetalang.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-01-14 19:14:20 -0200
committerHugo Lima <hugo.lima@openbossa.org>2010-01-15 15:21:11 -0200
commitce806c195494dc0c3c727d508378a434b5a676c6 (patch)
treeef0f04eb2554ad1891d315eab1bf6f11a34e6a95 /abstractmetalang.cpp
parentc3c654e7b7322cc5b1a2e0148143311caa9d26a4 (diff)
Fix AbstractMetaClass->isPolymorphic method, it was returning false for QEvent and other
classes having just a virtual destructor. Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Diffstat (limited to 'abstractmetalang.cpp')
-rw-r--r--abstractmetalang.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/abstractmetalang.cpp b/abstractmetalang.cpp
index db6e1b3e..101b97cf 100644
--- a/abstractmetalang.cpp
+++ b/abstractmetalang.cpp
@@ -1259,10 +1259,10 @@ void AbstractMetaClass::setFunctions(const AbstractMetaFunctionList &functions)
foreach (AbstractMetaFunction *f, m_functions) {
f->setOwnerClass(this);
- m_hasVirtualSlots |= f->isVirtualSlot();
- m_hasVirtuals |= !f->isFinal() || f->isVirtualSlot();
- m_isPolymorphic |= m_hasVirtuals;
- m_hasNonpublic |= !f->isPublic();
+ m_hasVirtualSlots = m_hasVirtualSlots || f->isVirtualSlot();
+ m_hasVirtuals = m_hasVirtuals || !f->isFinal() || f->isVirtualSlot();
+ m_isPolymorphic = m_isPolymorphic || m_hasVirtuals || hasVirtualDestructor();
+ m_hasNonpublic = m_hasNonpublic || !f->isPublic();
// If we have non-virtual overloads of a virtual function, we have to implement
// all the overloads in the shell class to override the hiding rule