[Uml-devel] [Bug 126489] Code generation wizard fails at generating C++ implementation code

Oliver Kellogg okellogg at users.sourceforge.net
Thu May 18 00:12:17 UTC 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=126489         
okellogg users sourceforge net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From okellogg users sourceforge net  2006-05-18 09:11 -------
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