[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators

Oliver Kellogg okellogg at users.sourceforge.net
Thu May 18 00:11:08 UTC 2006


SVN commit 542071 by okellogg:

Constructor, updateMethodDeclaration(): The comment says
  // if a property has a friend stereotype, the operation should
  // not be a class name
but the code is not writen that way.
Thanks to Tobias Klein <lists_at_tklein.info> for spotting the problem at
http://www.geeksoc.org/~jr/umbrello/uml-devel/9495.html
BUG:126489


 M  +6 -6      cppsourcecodeoperation.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators/cppsourcecodeoperation.cpp #542070:542071
@@ -76,11 +76,11 @@
     else if (returnType.isEmpty())
         returnType = QString("void");
 
+    QString startText = returnType + " ";
+
     // if a property has a friend stereotype, the operation should
     // not be a class name
-    QString startText = returnType + " ";
-
-    if (!o->getStereotype().isEmpty() && o->getStereotype(false) == "friend")
+    if (o->getStereotype() != "friend")
         startText += className + "::";
     startText += methodName + " ("+paramStr+")";
     if (o->getConst())
@@ -166,11 +166,11 @@
     else if (returnType.isEmpty())
         returnType = QString("void");
 
+    QString startText = returnType + " ";
+
     // if a property has a friend stereotype, the operation should
     // not be a class name
-    QString startText = returnType + " ";
-
-    if (!o->getStereotype().isEmpty() && o->getStereotype(false) == "friend")
+    if (o->getStereotype() != "friend")
         startText += className + "::";
     startText += methodName + " ("+paramStr+")";
     if (o->getConst())




More information about the umbrello-devel mailing list