aboutsummaryrefslogtreecommitdiffstats
path: root/abstractmetalang.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-01-26 22:04:46 -0200
committerHugo Lima <hugo.lima@openbossa.org>2010-01-26 22:04:46 -0200
commit9d4b69933df49c778e4b96a23894f26d4f741283 (patch)
treea1b93ecb783bdff4d580b4bdfaf839fabd9a7720 /abstractmetalang.cpp
parent8ae4a89abd334610293a4785856acbf59ffd25af (diff)
Fix AbstractMetaClass::has* methods, so they only check your own methods.
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'abstractmetalang.cpp')
-rw-r--r--abstractmetalang.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/abstractmetalang.cpp b/abstractmetalang.cpp
index ff27a9b1..34a4f220 100644
--- a/abstractmetalang.cpp
+++ b/abstractmetalang.cpp
@@ -1133,7 +1133,7 @@ AbstractMetaFunctionList AbstractMetaClass::operatorOverloads(uint query) const
bool AbstractMetaClass::hasOperatorOverload() const
{
foreach (const AbstractMetaFunction *f, m_functions) {
- if (f->isOperatorOverload())
+ if (f->ownerClass() == f->implementingClass() && f->isOperatorOverload())
return true;
}
return false;
@@ -1142,7 +1142,7 @@ bool AbstractMetaClass::hasOperatorOverload() const
bool AbstractMetaClass::hasArithmeticOperatorOverload() const
{
foreach (const AbstractMetaFunction *f, m_functions) {
- if (f->isArithmeticOperator())
+ if (f->ownerClass() == f->implementingClass() && f->isArithmeticOperator())
return true;
}
return false;
@@ -1151,7 +1151,7 @@ bool AbstractMetaClass::hasArithmeticOperatorOverload() const
bool AbstractMetaClass::hasBitwiseOperatorOverload() const
{
foreach (const AbstractMetaFunction *f, m_functions) {
- if (f->isBitwiseOperator())
+ if (f->ownerClass() == f->implementingClass() && f->isBitwiseOperator())
return true;
}
return false;
@@ -1160,7 +1160,7 @@ bool AbstractMetaClass::hasBitwiseOperatorOverload() const
bool AbstractMetaClass::hasComparisonOperatorOverload() const
{
foreach (const AbstractMetaFunction *f, m_functions) {
- if (f->isComparisonOperator())
+ if (f->ownerClass() == f->implementingClass() && f->isComparisonOperator())
return true;
}
return false;
@@ -1169,7 +1169,7 @@ bool AbstractMetaClass::hasComparisonOperatorOverload() const
bool AbstractMetaClass::hasLogicalOperatorOverload() const
{
foreach (const AbstractMetaFunction *f, m_functions) {
- if (f->isLogicalOperator())
+ if (f->ownerClass() == f->implementingClass() && f->isLogicalOperator())
return true;
}
return false;
@@ -1178,7 +1178,7 @@ bool AbstractMetaClass::hasLogicalOperatorOverload() const
bool AbstractMetaClass::hasSubscriptOperatorOverload() const
{
foreach (const AbstractMetaFunction *f, m_functions) {
- if (f->isSubscriptOperator())
+ if (f->ownerClass() == f->implementingClass() && f->isSubscriptOperator())
return true;
}
return false;
@@ -1187,7 +1187,7 @@ bool AbstractMetaClass::hasSubscriptOperatorOverload() const
bool AbstractMetaClass::hasAssignmentOperatorOverload() const
{
foreach (const AbstractMetaFunction *f, m_functions) {
- if (f->isAssignmentOperator())
+ if (f->ownerClass() == f->implementingClass() && f->isAssignmentOperator())
return true;
}
return false;
@@ -1196,7 +1196,7 @@ bool AbstractMetaClass::hasAssignmentOperatorOverload() const
bool AbstractMetaClass::hasConversionOperatorOverload() const
{
foreach (const AbstractMetaFunction *f, m_functions) {
- if (f->isConversionOperator())
+ if (f->ownerClass() == f->implementingClass() && f->isConversionOperator())
return true;
}
return false;