summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-05-16 17:26:39 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:16 -0300
commit2acdd73d6a0e63e0df9f8744ab8b6ee20c336666 (patch)
treea2f579e75c0340ac6d6410ca4987fb2ff4c1ce70
parent38e7c4839a89fa2bf7602143d779eb99dee5c9de (diff)
Fix bug 851 - "Shiboken recognizes dereference operator overload as times operator overload."sb-0.10.3
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
-rw-r--r--abstractmetalang.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/abstractmetalang.cpp b/abstractmetalang.cpp
index 3b7adb16..08aa8603 100644
--- a/abstractmetalang.cpp
+++ b/abstractmetalang.cpp
@@ -784,6 +784,11 @@ bool AbstractMetaFunction::isArithmeticOperator() const
return false;
QString name = originalName();
+
+ // It's a dereference operator!
+ if (name == "operator*" && m_arguments.isEmpty())
+ return false;
+
return name == "operator+" || name == "operator+="
|| name == "operator-" || name == "operator-="
|| name == "operator*" || name == "operator*="
@@ -1343,7 +1348,7 @@ void AbstractMetaClass::addFunction(AbstractMetaFunction *function)
{
Q_ASSERT(!function->signature().startsWith("("));
function->setOwnerClass(this);
-
+
if (!function->isDestructor())
m_functions << function;
else