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

Oliver Kellogg okellogg at users.sourceforge.net
Thu Oct 19 20:05:30 UTC 2006


SVN commit 597279 by okellogg:

Avoid using numeric IDs for the root folders - they may collide with
ID numbers from pre-1.5.5 files.
Note to users: Please do not use the Umbrello that comes with KDE 3.5.5.
The corrected version will be released shortly at http://uml.sf.net
CCBUG:135749


 M  +5 -4      umldoc.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umldoc.cpp #597278:597279
@@ -114,10 +114,10 @@
         i18n("Entity Relationship Model")
     };
     for (int i = 0; i < Uml::N_MODELTYPES; i++) {
-        m_root[i] = new UMLFolder(nativeRootName[i]);
+        m_root[i] = new UMLFolder(nativeRootName[i], STR2ID(nativeRootName[i]));
         m_root[i]->setLocalName(localizedRootName[i]);
     }
-    m_datatypeRoot = new UMLFolder("Datatypes");
+    m_datatypeRoot = new UMLFolder("Datatypes", "Datatypes");
     m_datatypeRoot->setLocalName(i18n("Datatypes"));
     m_datatypeRoot->setUMLPackage(m_root[Uml::mt_Logical]);
     m_root[Uml::mt_Logical]->addObject(m_datatypeRoot);
@@ -302,7 +302,7 @@
         for (int i = 0; i < Uml::N_MODELTYPES; i++)
             m_root[i]->removeAllObjects();
         // Restore the datatype folder, it has been deleted above.
-        m_datatypeRoot = new UMLFolder("Datatypes");
+        m_datatypeRoot = new UMLFolder("Datatypes", "Datatypes");
         m_datatypeRoot->setLocalName(i18n("Datatypes"));
         m_datatypeRoot->setUMLPackage(m_root[Uml::mt_Logical]);
         m_root[Uml::mt_Logical]->addObject(m_datatypeRoot);
@@ -852,7 +852,8 @@
 }
 
 UMLStereotype* UMLDoc::findStereotype(const QString &name) {
-    for (UMLStereotype *s = m_stereoList.first(); s; s = m_stereoList.next() ) {
+    UMLStereotype *s;
+    for (UMLStereotypeListIt it(m_stereoList); (s = it.current()) != NULL; ++it) {
         if (s->getName() == name)
             return s;
     }




More information about the umbrello-devel mailing list