[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Fri Oct 29 13:55:53 UTC 2004
CVS commit by okellogg:
Progress on bugs.kde.org/56184: Create a <UML:Parameter> for the return type.
M +12 -4 operation.cpp 1.32
--- kdesdk/umbrello/umbrello/operation.cpp #1.31:1.32
@@ -231,7 +231,17 @@ void UMLOperation::saveToXMI( QDomDocume
QDomElement operationElement = UMLObject::save("UML:Operation", qDoc);
if (m_pSecondary) {
- operationElement.setAttribute( "type", ID2STR(m_pSecondary->getID()) );
+ //operationElement.setAttribute( "type", ID2STR(m_pSecondary->getID()) );
+ if (m_pSecondary->getName() != "void") {
+ QDomElement retElement = qDoc.createElement("UML:Parameter");
+ UMLDoc *pDoc = UMLApp::app()->getDocument();
+ retElement.setAttribute( "xmi.id", ID2STR(pDoc->getUniqueID()) );
+ retElement.setAttribute( "type", ID2STR(m_pSecondary->getID()) );
+ retElement.setAttribute( "kind", "return" );
+ operationElement.appendChild( retElement );
+ }
} else {
- operationElement.setAttribute( "type", m_SecondaryId );
+ //operationElement.setAttribute( "type", m_SecondaryId );
+ kdDebug() << "UMLOperation::saveToXMI: m_SecondaryId is "
+ << m_SecondaryId << endl;
}
//save each attribute here, type different
@@ -291,6 +301,4 @@ bool UMLOperation::load( QDomElement & e
QString kind = attElement.attribute("kind", "in");
if (kind == "return") {
- // TEMPORARY: For the time being we are sure
- // this is a foreign XMI file.
// Use deferred xmi.id resolution.
m_pSecondary = NULL;
More information about the umbrello-devel
mailing list