[Uml-devel] KDE/kdesdk/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Sat Feb 18 11:50:01 UTC 2006


SVN commit 511086 by okellogg:

sync with branches/KDE/3.5

 M  +4 -1      ChangeLog  
 M  +2 -1      umbrello/import_utils.cpp  
 M  +4 -6      umbrello/umllistview.cpp  
 M  +5 -7      umbrello/umllistview.h  
 M  +2 -2      umbrello/umllistviewitem.cpp  


--- trunk/KDE/kdesdk/umbrello/ChangeLog #511085:511086
@@ -5,13 +5,16 @@
 * fixed problem with font size computation/word wrap in note widgets
   http://sourceforge.net/mailarchive/forum.php?thread_id=9558795&forum_id=472
 * Bugs/wishes from http://bugs.kde.org:
-* Umbrello doesnt allow some keywords for return types (115991)
+* Import Rose model files (81364)
+* Default data types not added for old Java generator (115991)
 * Multiplicity labels positioned incorrectly when moving entities (120598)
 * Types of entity's attributes are displayed instead of their names (120742)
 * Unable to delete entity from entity list in "UML Model" frame (120750)
 * Interface names not italicized in diagram view (120761)
 * Cannot Resize Sequence Diagram Synchronous Messages (120910)
 * Crash when importing Python files (121952)
+* "void" is imported as class and not datatypes (122184)
+* Crash when creating a datatype with the same name as a class (122188)
 
 Version 1.5.1
 
--- trunk/KDE/kdesdk/umbrello/umbrello/import_utils.cpp #511085:511086
@@ -268,7 +268,8 @@
                                bool isFriend, bool isConstructor,
                                QString comment) {
     op->setVisibility(scope);
-    if (!type.isEmpty()) {  // return type may be missing (constructor/destructor)
+    if (!type.isEmpty()     // return type may be missing (constructor/destructor)
+        && type != "void") {
         if (type == klass->getName()) {
             op->setType(klass);
         } else {
--- trunk/KDE/kdesdk/umbrello/umbrello/umllistview.cpp #511085:511086
@@ -2237,7 +2237,7 @@
     // is called (automatically by QListViewItem.)
 }
 
-bool UMLListView::slotItemRenamed( Q3ListViewItem * item , int /*col*/ ) {
+bool UMLListView::itemRenamed( Q3ListViewItem * item , int /*col*/ ) {
     //if true the item was cancel before this message
     if( m_bIgnoreCancelRename ) {
         return true;
@@ -2248,13 +2248,12 @@
     QString newText = renamedItem -> text( 0 );
     renamedItem -> setCreating( false );
 
-    //if the length of any type then delete it.
-    if( newText.length() == 0 ) {
+    // If the type is empty then delete it.
+    if (newText.isEmpty() || newText.contains(QRegExp("^\\s+$"))) {
         KMessageBox::error(
             kapp -> mainWidget(),
             i18n( "The name you entered was invalid.\nCreation process has been canceled." ),
             i18n( "Name Not Valid" ) );
-        delete item;
         return false;
     }
     // No need to do anything for folders if the string length was > 0
@@ -2277,7 +2276,6 @@
                 kapp -> mainWidget(),
                 i18n( "The name you entered was not unique!\nCreation process has been canceled." ),
                 i18n( "Name Not Unique" ) );
-            delete item;
             return false;
         }
     }
@@ -2297,7 +2295,7 @@
         {
             Uml::Object_Type ot = convert_LVT_OT(type);
             if (! ot) {
-                kError() << "UMLListView::slotItemRenamed() internal" << endl;
+                kError() << "UMLListView::itemRenamed() internal" << endl;
                 return false;
             }
             createUMLObject( renamedItem, ot );
--- trunk/KDE/kdesdk/umbrello/umbrello/umllistview.h #511085:511086
@@ -309,6 +309,11 @@
     UMLListViewItem * moveObject(Uml::IDType srcId, Uml::ListView_Type srcType,
                                  UMLListViewItem *newParent);
 
+    /**
+     * Called for informing the list view that an item was renamed.
+     */
+    bool itemRenamed(Q3ListViewItem* item , int col);
+
     void closeDatatypesFolder();
 
     UMLListViewItem *theRootView() { return m_rv; }
@@ -536,13 +541,6 @@
      */
     void slotCutSuccessful();
 
-    /**
-     *     When a user requests a new item we wait for the signal
-     *     to then verify the item.  The class only connects to the
-     *     rename signal while needed.
-     */
-    bool slotItemRenamed(Q3ListViewItem* item , int col);
-
 signals:
 
     /**
--- trunk/KDE/kdesdk/umbrello/umbrello/umllistviewitem.cpp #511085:511086
@@ -338,11 +338,11 @@
         m_bCreating = false;
         QString savedLabel = m_Label;
         m_Label = text(col);
-        if ( s_pListView->slotItemRenamed( this, col ) ) {
+        if ( s_pListView->itemRenamed( this, col ) ) {
             s_pListView->ensureItemVisible(this);
             doc->setModified(true);
         } else {
-            m_Label = savedLabel;
+            delete this;
         }
         return;
     }




More information about the umbrello-devel mailing list