aboutsummaryrefslogtreecommitdiffstats
path: root/abstractmetabuilder.cpp
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-12-29 16:36:26 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:13 -0300
commitb6fdc5e8e6555aa7ee2cfe709fc68725ddc68ea4 (patch)
tree4906b8ec911e73ffca1ebaf4db58623133dcd3b4 /abstractmetabuilder.cpp
parent82aaafc79c78a16717be5433e84aed3c51c4a4c8 (diff)
Add support to fix bug#493 - "__eq__ and friends not implemented for QKeyEvent == QKeySequence"
Reviewer: Renato Araújo <renato.filho@openbossa.org> Lauro Moura <lauro.neto@openbossa.org>
Diffstat (limited to 'abstractmetabuilder.cpp')
-rw-r--r--abstractmetabuilder.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/abstractmetabuilder.cpp b/abstractmetabuilder.cpp
index 1ef12bc48..780ea7009 100644
--- a/abstractmetabuilder.cpp
+++ b/abstractmetabuilder.cpp
@@ -201,7 +201,9 @@ void AbstractMetaBuilder::traverseOperatorFunction(FunctionModelItem item)
// Strip away first argument, since that is the containing object
AbstractMetaArgumentList arguments = metaFunction->arguments();
if (firstArgumentIsSelf || unaryOperator) {
- AbstractMetaArgument *first = arguments.takeFirst();
+ AbstractMetaArgument* first = arguments.takeFirst();
+ if (!unaryOperator && first->type()->indirections())
+ metaFunction->setPointerOperator(true);
delete first;
metaFunction->setArguments(arguments);
} else {
@@ -210,7 +212,9 @@ void AbstractMetaBuilder::traverseOperatorFunction(FunctionModelItem item)
// must be an reverse operator (e.g. CLASS::operator(TYPE, CLASS)).
// All operator overloads that operate over a class are already
// being added as member functions of that class by the API Extractor.
- AbstractMetaArgument *last = arguments.takeLast();
+ AbstractMetaArgument* last = arguments.takeLast();
+ if (last->type()->indirections())
+ metaFunction->setPointerOperator(true);
delete last;
metaFunction->setArguments(arguments);