[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sat Jan 1 06:00:05 UTC 2005
CVS commit by okellogg:
Save changeability in XMI standard compliant format.
M +8 -7 umlrole.cpp 1.36
--- kdesdk/umbrello/umbrello/umlrole.cpp #1.35:1.36
@@ -174,12 +174,11 @@ void UMLRole::saveToXMI( QDomDocument &
switch (m_Changeability) {
case Uml::chg_Frozen:
- roleElement.setAttribute("changeable", "frozen");
+ roleElement.setAttribute("changeability", "frozen");
break;
case Uml::chg_AddOnly:
- roleElement.setAttribute("changeable", "addOnly");
+ roleElement.setAttribute("changeability", "addOnly");
break;
case Uml::chg_Changeable:
- // This is the default.
- // roleElement.setAttribute("changeable", "none");
+ roleElement.setAttribute("changeability", "changeable");
break;
}
@@ -343,8 +342,10 @@ bool UMLRole::load( QDomElement & elemen
// Changeability defaults to Changeable if it cant set it here..
m_Changeability = Uml::chg_Changeable;
- QString changeable = element.attribute("changeable", "none");
- if (changeable == "frozen")
+ QString changeability = element.attribute("changeability", "");
+ if (changeability.isEmpty())
+ element.attribute("changeable", ""); // for backward compatibility
+ if (changeability == "frozen")
m_Changeability = Uml::chg_Frozen;
- else if (changeable == "addOnly")
+ else if (changeability == "addOnly")
m_Changeability = Uml::chg_AddOnly;
More information about the umbrello-devel
mailing list