summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-08-10 14:20:23 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:08 -0300
commit243d81b4f730d4f939603aa1c5f8d60423c2c4d0 (patch)
tree71f8335db091963f66f0a426f8b5dcbec9e7bbdf
parent8b84c3340b7869fa80a0037bb3a5339ce2845329 (diff)
Does not consider private operators.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--abstractmetalang.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/abstractmetalang.cpp b/abstractmetalang.cpp
index ed6278ec..49789c03 100644
--- a/abstractmetalang.cpp
+++ b/abstractmetalang.cpp
@@ -1135,7 +1135,7 @@ AbstractMetaFunctionList AbstractMetaClass::implicitConversions() const
AbstractMetaFunctionList AbstractMetaClass::operatorOverloads(uint query) const
{
- AbstractMetaFunctionList list = queryFunctions(OperatorOverloads);
+ AbstractMetaFunctionList list = queryFunctions(OperatorOverloads | Visible);
AbstractMetaFunctionList returned;
foreach (AbstractMetaFunction *f, list) {
if (((query & ArithmeticOp) && f->isArithmeticOperator())
@@ -1155,7 +1155,7 @@ AbstractMetaFunctionList AbstractMetaClass::operatorOverloads(uint query) const
bool AbstractMetaClass::hasOperatorOverload() const
{
foreach (const AbstractMetaFunction *f, m_functions) {
- if (f->ownerClass() == f->implementingClass() && f->isOperatorOverload())
+ if (f->ownerClass() == f->implementingClass() && f->isOperatorOverload() && !f->isPrivate())
return true;
}
return false;
@@ -1164,7 +1164,7 @@ bool AbstractMetaClass::hasOperatorOverload() const
bool AbstractMetaClass::hasArithmeticOperatorOverload() const
{
foreach (const AbstractMetaFunction *f, m_functions) {
- if (f->ownerClass() == f->implementingClass() && f->isArithmeticOperator())
+ if (f->ownerClass() == f->implementingClass() && f->isArithmeticOperator() && !f->isPrivate())
return true;
}
return false;
@@ -1173,7 +1173,7 @@ bool AbstractMetaClass::hasArithmeticOperatorOverload() const
bool AbstractMetaClass::hasBitwiseOperatorOverload() const
{
foreach (const AbstractMetaFunction *f, m_functions) {
- if (f->ownerClass() == f->implementingClass() && f->isBitwiseOperator())
+ if (f->ownerClass() == f->implementingClass() && f->isBitwiseOperator() && !f->isPrivate())
return true;
}
return false;
@@ -1182,7 +1182,7 @@ bool AbstractMetaClass::hasBitwiseOperatorOverload() const
bool AbstractMetaClass::hasComparisonOperatorOverload() const
{
foreach (const AbstractMetaFunction *f, m_functions) {
- if (f->ownerClass() == f->implementingClass() && f->isComparisonOperator())
+ if (f->ownerClass() == f->implementingClass() && f->isComparisonOperator() && !f->isPrivate())
return true;
}
return false;
@@ -1191,7 +1191,7 @@ bool AbstractMetaClass::hasComparisonOperatorOverload() const
bool AbstractMetaClass::hasLogicalOperatorOverload() const
{
foreach (const AbstractMetaFunction *f, m_functions) {
- if (f->ownerClass() == f->implementingClass() && f->isLogicalOperator())
+ if (f->ownerClass() == f->implementingClass() && f->isLogicalOperator() && !f->isPrivate())
return true;
}
return false;
@@ -1200,7 +1200,7 @@ bool AbstractMetaClass::hasLogicalOperatorOverload() const
bool AbstractMetaClass::hasSubscriptOperatorOverload() const
{
foreach (const AbstractMetaFunction *f, m_functions) {
- if (f->ownerClass() == f->implementingClass() && f->isSubscriptOperator())
+ if (f->ownerClass() == f->implementingClass() && f->isSubscriptOperator() && !f->isPrivate())
return true;
}
return false;
@@ -1209,7 +1209,7 @@ bool AbstractMetaClass::hasSubscriptOperatorOverload() const
bool AbstractMetaClass::hasAssignmentOperatorOverload() const
{
foreach (const AbstractMetaFunction *f, m_functions) {
- if (f->ownerClass() == f->implementingClass() && f->isAssignmentOperator())
+ if (f->ownerClass() == f->implementingClass() && f->isAssignmentOperator() && !f->isPrivate())
return true;
}
return false;
@@ -1218,7 +1218,7 @@ bool AbstractMetaClass::hasAssignmentOperatorOverload() const
bool AbstractMetaClass::hasConversionOperatorOverload() const
{
foreach (const AbstractMetaFunction *f, m_functions) {
- if (f->ownerClass() == f->implementingClass() && f->isConversionOperator())
+ if (f->ownerClass() == f->implementingClass() && f->isConversionOperator() && !f->isPrivate())
return true;
}
return false;