From 6067084bbfb6d479bcb886c73dba402c71257765 Mon Sep 17 00:00:00 2001 From: Lauro Neto Date: Tue, 3 Nov 2009 21:00:43 -0300 Subject: Remove the stream argument when modifying <> The global operator function was being added to a class' method list but without modifying the argument list by removing the owner class. It was removed a long time ago when working on boostpythongenerator. Reviewed by Hugo Parente --- abstractmetabuilder.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/abstractmetabuilder.cpp b/abstractmetabuilder.cpp index 0cd479911..9c739c633 100644 --- a/abstractmetabuilder.cpp +++ b/abstractmetabuilder.cpp @@ -229,9 +229,13 @@ void AbstractMetaBuilder::traverseStreamOperator(FunctionModelItem item) QString name = item->name(); streamFunction->setFunctionType(AbstractMetaFunction::GlobalScopeFunction); // Strip first argument, since that is the containing object - //AbstractMetaArgumentList arguments = streamFunction->arguments(); - //arguments.pop_front(); - //streamFunction->setArguments(arguments); + AbstractMetaArgumentList arguments = streamFunction->arguments(); + if (!streamClass->typeEntry()->generateCode()) + arguments.pop_back(); + else + arguments.pop_front(); + + streamFunction->setArguments(arguments); *streamFunction += AbstractMetaAttributes::Final; *streamFunction += AbstractMetaAttributes::Public; -- cgit v1.2.3