Summary: | Code generation wizard fails at generating C++ implementation code | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | greatbunzinni |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.5.2 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
greatbunzinni
2006-04-29 22:21:49 UTC
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()) |