[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdesdk/umbrello/umbrello
From: Oliver Kellogg <okellogg () users ! sourceforge ! net>
Date: 2005-09-02 18:34:25
Message-ID: 1125686065.470821.1974.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 456388 by okellogg:
Mention mismatch between role_id and Uml::Role_Type.
M +5 -0 ownedcodeblock.cpp
M +3 -1 ownedhierarchicalcodeblock.cpp
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/ownedcodeblock.cpp #456387:456388
@@ -84,6 +84,10 @@
if(role)
{
elem.setAttribute("parent_id",ID2STR(role->getParentAssociation()->getID()));
+ // CAUTION: role_id here is numerically inverted wrt Uml::Role_Type,
+ // i.e. role A is 1 and role B is 0.
+ // I'll resist the temptation to change this -
+ // in order to maintain backward compatibility.
elem.setAttribute("role_id", (role->getRole() == Uml::A));
}
else
@@ -126,6 +130,7 @@
// In this case we init with indicated role child obj.
UMLRole * role = 0;
int role_id = elem.attribute("role_id","-1").toInt();
+ // see comment on role_id at setAttributesOnNode()
if(role_id == 1)
role = assoc->getUMLRole(Uml::A);
else if(role_id == 0)
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/ownedhierarchicalcodeblock.cpp #456387:456388
@@ -68,8 +68,10 @@
// as UMLRoles arent properly stored in the XMI right now.
// (change would break the XMI format..save for big version change )
UMLRole * role = dynamic_cast<UMLRole*>(getParentObject());
- if(role)
+ if(role) {
+ // see comment on role_id at OwnedCodeBlock::setAttributesOnNode()
elem.setAttribute("role_id", (role->getRole() == Uml::A));
+ }
/* else
elem.setAttribute("role_id","-1");
*/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic