Version: 1.5.2 (using KDE KDE 3.5.2) The code generation wizard fails at generating C++ implementation code. Instead of generating the implementation of the class' methods, the code generation wizard writes only the method's name and ommits the class name and the scope operator. For example: instead of <code> void testclass::testmethod() { } </code> The code generation wizard produces code like so: <code> void testmethod() { } </code>
How did you generate the code? I can't confirm - but I only tried "Generate All Code" from the "Code" menu.
I've generated the code through the code generation wizard from the a class diagram which I've created with Umbrello. I tested it again and again the classes had no class name or reference operator. If you wish I can add the Umbrello file as an attachment.
Ah, okay, now I see it.
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())