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

Andi Fischer andi.fischer at hispeed.ch
Sun Nov 21 18:31:31 UTC 2010


SVN commit 1199372 by fischer:

BUG: 203118, 238775 seems to be fixed now. XMI file attached to the bug 238775 is loading now.

 M  +2 -2      package.cpp  
 U             package.h  
 M  +12 -1     umldoc.cpp  
 M  +2 -3      umlobjectlist.h  


--- trunk/KDE/kdesdk/umbrello/umbrello/package.cpp #1199371:1199372
@@ -150,8 +150,8 @@
             }
             addAssocToConcepts(assoc);
         }
-    } else {
-
+    }
+    else {
       QString name = pObject->name();
       QString oldName = name;
       while ( findObject( name ) != NULL  ) {
--- trunk/KDE/kdesdk/umbrello/umbrello/umldoc.cpp #1199371:1199372
@@ -2076,9 +2076,14 @@
             pkg = m_datatypeRoot;
         } else {
             Uml::Model_Type guess = Model_Utils::guessContainer(pObject);
-            if (guess != Uml::N_MODELTYPES)
+            if (guess != Uml::N_MODELTYPES) {
                 pkg = m_root[guess];
         }
+            else {
+                uError() << "Guess is Uml::N_MODELTYPES - package not set correctly!";
+                pkg = m_root[Uml::mt_Logical];
+            }
+        }
         pObject->setUMLPackage(pkg);
 
         bool status = pObject->loadFromXMI( tempElement );
@@ -2105,7 +2110,13 @@
             }
             continue;
         }
+        if (pkg) {
         pkg->addObject(pObject);
+        }
+        else {
+            uError() << "Package is NULL for " << pObject->name();
+            return false;
+        }
 
         /* FIXME see comment at loadUMLObjectsFromXMI
         emit sigSetStatusbarProgress( ++m_count );
--- trunk/KDE/kdesdk/umbrello/umbrello/umlobjectlist.h #1199371:1199372
@@ -5,7 +5,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  *   copyright (C) 2001      Gustavo Madrigal gmadrigal at nextphere.com      *
- *   copyright (C) 2002-2009                                               *
+ *   copyright (C) 2002-2010                                               *
  *   Umbrello UML Modeller Authors <uml-devel at uml.sf.net>                  *
  ***************************************************************************/
 
@@ -17,11 +17,10 @@
 // forward declarations
 class UMLObject;
 
-//typedef QPtrList<UMLObject> UMLObjectList;
 typedef QListIterator<UMLObject*> UMLObjectListIt;
 
 /**
- * This sub-class adds copyInto and clone to the QPtrList<UMLObject>
+ * This sub-class adds copyInto and clone to the QList<UMLObject*>
  * base class.
  */
 class UMLObjectList : public QList<UMLObject*>




More information about the umbrello-devel mailing list