[Uml-devel] KDE/kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sat Feb 11 22:29:43 UTC 2012
SVN commit 1279506 by okellogg:
load(): Improve readability of code for loading of
<UML:Association.connection> subelements:
- For loading of first <UML:AssociationEnd> use variable nodeA
- For loading of second <UML:AssociationEnd> use variable nodeB
M +8 -8 association.cpp
--- trunk/KDE/kdesdk/umbrello/umbrello/association.cpp #1279505:1279506
@@ -303,10 +303,10 @@
continue;
}
// Load role A.
- node = tempElement.firstChild();
- while (node.isComment())
- node = node.nextSibling();
- tempElement = node.toElement();
+ QDomNode nodeA = tempElement.firstChild();
+ while (nodeA.isComment())
+ nodeA = nodeA.nextSibling();
+ tempElement = nodeA.toElement();
if (tempElement.isNull()) {
uWarning() << "UML:Association : element (A) is Null";
return false;
@@ -320,10 +320,10 @@
if (! getUMLRole(A)->loadFromXMI(tempElement))
return false;
// Load role B.
- node = node.nextSibling();
- while (node.isComment())
- node = node.nextSibling();
- tempElement = node.toElement();
+ QDomNode nodeB = nodeA.nextSibling();
+ while (nodeB.isComment())
+ nodeB = nodeB.nextSibling();
+ tempElement = nodeB.toElement();
if (tempElement.isNull()) {
uWarning() << "UML:Association : element (B) is Null";
return false;
More information about the umbrello-devel
mailing list