Bug 85136 - Return type not shown on new operations on sequence diagram
Summary: Return type not shown on new operations on sequence diagram
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Oliver Kellogg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-14 00:58 UTC by Jonathan Riddell
Modified: 2005-01-29 07:13 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Riddell 2004-07-14 00:58:40 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

On a message on a sequence diagram do right click->New operation, create the new operation and click OK.  The return type is not shown.

The return type is shown if you select the operation through "Select Operation".
Comment 1 Oliver Kellogg 2005-01-27 12:56:36 UTC
What do you think of generally not showing the return type "void"?
This shortens the signature - a Good Thing IMHO.
Comment 2 Jonathan Riddell 2005-01-27 13:13:01 UTC
I agree with comment No 1.
Comment 3 Oliver Kellogg 2005-01-29 07:13:02 UTC
CVS commit by okellogg: 

Generally do not show the return type "void".
The original intent of the PR, "return type not shown on new operations
on sequence diagram", does not happen for me (probably was fixed as a side
effect of some other repair.)
BUG:85136


  M +3 -3      ChangeLog   1.63
  M +4 -6      umbrello/operation.cpp   1.38
  M +0 -3      umbrello/umldoc.cpp   1.235


--- kdesdk/umbrello/ChangeLog  #1.62:1.63
@@ -16,7 +16,7 @@
 
 * Bugs fixed / wishes implemented (see http://bugs.kde.org)
-53380 53384 54928 55058 55242 57879       61945 62321 63316
-67062 67723 69592 71978 74249 74952 75010 77645 80405 80559
-82342 84515 85377 86083 86828 86952 86958 87111 87537 87956
+53380 53384 54928 55058 55242 57879 61945 62321 63316 67062
+67723 69592 71978 74249 74952 75010 77645 80405 80559 82342
+84515 85136 85377 86083 86828 86952 86958 87111 87537 87956
 87995 88152 88245 88415 88954 89334 89485 89553 89563 89579
 89582 89699 89860 89903       90102 90106 90206 90755 91298

--- kdesdk/umbrello/umbrello/operation.cpp  #1.37:1.38
@@ -154,5 +154,5 @@ QString UMLOperation::toString(Uml::Sign
         s.append(")");
         QString returnType = UMLClassifierListItem::getTypeName();
-        if (returnType.length() > 0 ) {
+        if (returnType.length() > 0 && returnType != "void") {
                 s.append(" : ");
 
@@ -235,6 +235,5 @@ void UMLOperation::saveToXMI( QDomDocume
         QDomElement featureElement = qDoc.createElement( "UML:BehavioralFeature.parameter" );
         if (m_pSecondary) {
-                //@todo Check: is "void" a programming language specific keyword?
-                //if (m_pSecondary->getName() != "void") {
+                if (m_pSecondary->getName() != "void") {
                         QDomElement retElement = qDoc.createElement("UML:Parameter");
                         UMLDoc *pDoc = UMLApp::app()->getDocument();
@@ -243,5 +242,5 @@ void UMLOperation::saveToXMI( QDomDocume
                         retElement.setAttribute( "kind", "return" );
                         featureElement.appendChild( retElement );
-                //}
+                }
         } else {
                 //operationElement.setAttribute( "type", m_SecondaryId );
@@ -285,6 +284,5 @@ bool UMLOperation::load( QDomElement & e
                         if (m_pSecondary == NULL) {
                                 kdError() << "UMLOperation::load: Cannot find UML object"
-                                          << " for type " << type << endl;
-                                UMLClassifierListItem::setTypeName( "void" );
+                                          << " for return type " << type << endl;
                         }
                 }

--- kdesdk/umbrello/umbrello/umldoc.cpp  #1.234:1.235
@@ -522,7 +522,4 @@ bool UMLDoc::openDocument(const KURL& ur
         addToUndoStack();
 
-        // Add default stuff.
-        //createUMLObject(ot_Datatype, "void");  // "void" is used to indicate "no return type"
-
         return true;
 }