aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2009-11-03 21:00:43 -0300
committerHugo Lima <hugo.lima@openbossa.org>2009-11-09 15:32:05 -0200
commit6067084bbfb6d479bcb886c73dba402c71257765 (patch)
treed890ef33dc03fc317722e09643e6f463c29589d9
parentb6db1498536ce909dad79e85c00f0cec9a4e0340 (diff)
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 <hugo.lima@openbossa.org>
-rw-r--r--abstractmetabuilder.cpp10
1 files 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;