[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Thu Feb 8 22:28:31 UTC 2007


SVN commit 631744 by okellogg:

getDatatypes(): Interestingly, in the line
  UMLObjectListIt oit(m_datatypeRoot->containedObjects());
the iterator is always constructed on an empty list. If we instead write
  UMLObjectList objects = m_datatypeRoot->containedObjects();
  UMLObjectListIt oit(objects);
then all is fine.
CCBUG:141385


 M  +2 -2      umldoc.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umldoc.cpp #631743:631744
@@ -1870,10 +1870,10 @@
 }
 
 UMLClassifierList UMLDoc::getDatatypes() {
+    UMLObjectList objects = m_datatypeRoot->containedObjects();
     UMLClassifierList datatypeList;
     UMLObject *obj;
-    for (UMLObjectListIt oit(m_datatypeRoot->containedObjects());
-            (obj = oit.current()) != NULL; ++oit) {
+    for (UMLObjectListIt oit(objects); (obj = oit.current()) != NULL; ++oit) {
         if (obj->getBaseType() == ot_Datatype) {
             datatypeList.append(static_cast<UMLClassifier*>(obj));
         }




More information about the umbrello-devel mailing list