From b6fdc5e8e6555aa7ee2cfe709fc68725ddc68ea4 Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Wed, 29 Dec 2010 16:36:26 -0200 Subject: Add support to fix bug#493 - "__eq__ and friends not implemented for QKeyEvent == QKeySequence" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewer: Renato Araújo Lauro Moura --- abstractmetabuilder.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'abstractmetabuilder.cpp') 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); -- cgit v1.2.3