[Uml-devel] KDE/kdesdk/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Fri Feb 9 21:55:31 UTC 2007


SVN commit 632067 by okellogg:

sync with branches/KDE/3.5 (r630936:631974)

 M  +5 -3      ChangeLog  
 M  +6 -8      make-umbrello-release.sh  
 M  +6 -4      umbrello/dialogs/pkgcontentspage.cpp  
 M  +4 -4      umbrello/umldoc.cpp  
 M  +14 -11    umbrello/umlobject.cpp  


--- trunk/KDE/kdesdk/umbrello/ChangeLog #632066:632067
@@ -1,8 +1,10 @@
 Version 1.5.61
 
+* Copy/paste of attribute or operation in list view within same class
+* Improved loading of files from older versions
+* Ada import updated for Ada2005
 * Bugs fixed from http://bugs.kde.org:
-* Fixed crash on creating various types of associations (140693, 141073, 141106, 141277)
-  http://sourceforge.net/mailarchive/forum.php?thread_id=31539549&forum_id=460
+* Crash on creating various types of associations (140693, 141073, 141106, 141277)
 * Unclickable use case diagram (140870)
 
 Version 1.5.6
@@ -23,7 +25,7 @@
 * Bugs/wishes from http://bugs.kde.org:
 * Association line nodes don't drag along with multiply-selected classes (57878)
 * Disappearing parameters when editing class properties (114477)
-* Umbrello saves too much copies at xmi (135606)
+* Umbrello saves too many copies in xmi (135606)
 * Artifacts of a component diagram are wrongly placed in Deployment View folder (137564)
 * Incorrect export to SQL (138139)
 
--- trunk/KDE/kdesdk/umbrello/make-umbrello-release.sh #632066:632067
@@ -3,9 +3,8 @@
 # Make a release from the current branches/KDE/3.5/kdesdk/umbrello
 #
 # Run this script as follows:
-#   ./make-umbrello-release.sh VERSION KDEUSER [BRANCH_VERSION]
+#   . make-umbrello-release.sh VERSION [BRANCH_VERSION]
 # VERSION is the version to release.
-# KDEUSER is your KDE SVN user name.
 # BRANCH_VERSION defaults to 3.5.
 # @todo Create release from trunk if BRANCH_VERSION not given.
 #       Note: trunk uses the cmake based build process.
@@ -14,20 +13,19 @@
 # as the work area for building the release.
 # The release tarfile will be placed in the current working dir.
 # 
-if [ $# -lt 2 ]; then
+if [ $# -lt 1 ]; then
   echo "usage:"
-  echo "  ./make-umbrello-release.sh VERSION KDEUSER [BRANCH_VERSION]"
+  echo "  . make-umbrello-release.sh VERSION [BRANCH_VERSION]"
   exit 1
 fi
 version=$1
-user=$2
 branchver=3.5
-if [ $# -gt 2 ]; then
-  branchver=$3
+if [ $# -gt 1 ]; then
+  branchver=$2
 fi
 origdir=`pwd`
 udir=umbrello-$version
-svnroot=svn+ssh://${user}@svn.kde.org:/home/kde/branches/KDE/$branchver
+svnroot=svn://anonsvn.kde.org:/home/kde/branches/KDE/$branchver
 cd /tmp
 svn co -N $svnroot/kdesdk
 cd kdesdk
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/pkgcontentspage.cpp #632066:632067
@@ -66,14 +66,16 @@
     if (!i)
         return;
     int item = m_pContentLB -> currentItem();
-    UMLObject *o = m_pPackage->containedObjects().at(item);
+    UMLObjectList contents = m_pPackage->containedObjects();
+    UMLObject *o = contents.at(item);
     ClassPropDlg dlg(this, o, item, true);
     dlg.exec();
 }
 
 void PkgContentsPage::fillListBox() {
     m_pContentLB->clear();
-    UMLObjectListIt objList_it(m_pPackage->containedObjects());
+    UMLObjectList contents = m_pPackage->containedObjects();
+    UMLObjectListIt objList_it(contents);
     UMLObject* umlo = NULL;
     int i = 0;
     while ((umlo = objList_it.current()) != NULL) {
@@ -109,8 +111,8 @@
     switch(id) {
     case ListPopupMenu::mt_Delete:
         {
-            UMLObject *o = m_pPackage->containedObjects().at(
-                               m_pContentLB->currentItem() );
+            UMLObjectList contents = m_pPackage->containedObjects();
+            UMLObject *o = contents.at( m_pContentLB->currentItem() );
             UMLApp::app()->getDocument()->removeUMLObject(o);
             fillListBox();
         }
--- trunk/KDE/kdesdk/umbrello/umbrello/umldoc.cpp #632066:632067
@@ -1864,10 +1864,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));
         }
@@ -1878,9 +1878,9 @@
 UMLAssociationList UMLDoc::getAssociations() {
     UMLAssociationList associationList;
     for (int i = 0; i < Uml::N_MODELTYPES; i++) {
+        UMLAssociationList assocs = m_root[i]->getAssociations();
         UMLAssociation *a;
-        for (UMLAssociationListIt ait(m_root[i]->getAssociations());
-                (a = ait.current()) != NULL; ++ait)
+        for (UMLAssociationListIt ait(assocs); (a = ait.current()) != NULL; ++ait)
             associationList.append(a);
     }
     return associationList;
--- trunk/KDE/kdesdk/umbrello/umbrello/umlobject.cpp #632066:632067
@@ -414,10 +414,13 @@
         }
     }
     if (m_SecondaryFallback.isEmpty()) {
-        kError() << "UMLObject::resolveRef(" << m_Name
-                  << "): cannot find type with id "
-                  << m_SecondaryId << endl;
-        return false;
+        if (m_SecondaryId.isEmpty()) {
+            kError() << "UMLObject::resolveRef(" << m_Name
+                << "): both m_SecondaryId and m_SecondaryFallback are empty"
+                << endl;
+            return false;
+        }
+        m_SecondaryFallback = m_SecondaryId;
     }
 #ifdef VERBOSE_DEBUGGING
     kDebug() << "UMLObject::resolveRef(" << m_Name 
@@ -435,7 +438,6 @@
         maybeSignalObjectCreated();
         return true;
     }
-    //pDoc->setIsOldFile(true);
     // Work around Object_Factory::createUMLObject()'s incapability
     // of on-the-fly scope creation:
     if (m_SecondaryId.contains("::")) {
@@ -458,8 +460,7 @@
                   << "failed to create a new type for " << m_SecondaryId << endl;
         return false;
     }
-    kDebug() << "UMLObject::resolveRef: Creating new type for "
-    << m_SecondaryId << endl;
+    kDebug() << "UMLObject::resolveRef: Creating new type for " << m_SecondaryId << endl;
     // This is very C++ specific - we rely on  some '*' or
     // '&' to decide it's a ref type. Plus, we don't recognize
     // typedefs of ref types.
@@ -594,12 +595,14 @@
     if (!stereo.isEmpty()) {
         Uml::IDType stereoID = STR2ID(stereo);
         m_pStereotype = umldoc->findStereotypeById(stereoID);
-        if (m_pStereotype)
+        if (m_pStereotype) {
             m_pStereotype->incrRefCount();
-        else
-            kError() << "UMLObject::loadFromXMI(" << m_Name << "): "
+        } else {
+            kDebug() << "UMLObject::loadFromXMI(" << m_Name << "): "
                 << "UMLStereotype " << ID2STR(stereoID)
-                << " not found" << endl;
+                << " not found, creating now." << endl;
+            setStereotype(stereo);
+        }
     }
 
     if( element.hasAttribute("abstract") ) {     // for bkwd compat.




More information about the umbrello-devel mailing list