[Uml-devel] kdesdk/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Fri Jan 28 22:13:05 UTC 2005


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;
 }






More information about the umbrello-devel mailing list