[Uml-devel] branches/work/soc-umbrello

Andi Fischer andi.fischer at hispeed.ch
Mon Sep 12 06:13:36 UTC 2011


SVN commit 1252912 by fischer:

Bug fixed in UMLListView::deleteChildrenOf().

 M  +21 -1     test/ATP.txt  
 M  +2 -1      umbrello/dialogs/umlviewdialog.cpp  
 U             umbrello/docwindow.cpp  
 M  +4 -4      umbrello/uml.cpp  
 M  +9 -1      umbrello/umllistview.cpp  
 U             umbrello/umllistviewitem.h  
 M  +2 -0      umbrello/umlscene.cpp  


--- branches/work/soc-umbrello/test/ATP.txt #1252911:1252912
@@ -1,5 +1,5 @@
  ============================
-| Application Test Procedure |  (last updated: 2010-04-13 by Andi Fischer)
+| Application Test Procedure |  (last updated: 2011-07-31 by Andi Fischer)
  ============================
 
 ===============================================================================
@@ -341,6 +341,16 @@
 -------------------------------------------------------------------------------
 COI08 - Code import Java:                                        OK[ ]   NOK[ ]
 -------------------------------------------------------------------------------
+Testprocedure:
+  1) Download a java project, e.g. LAoE
+     information at http://www.oli4.ch/laoe/home.html
+     source code at http://sourceforge.net/projects/laoe/
+  2) Import all or only some single files.
+Testresult:
+  1) The code is parsed and imported as expected.
+  2) All classes are found.
+  3) All methods are found with the right parameters.
+  4) All attributes are found.
 
 -------------------------------------------------------------------------------
 COI09 - Code import JavaScript:                                  OK[ ]   NOK[ ]
@@ -373,6 +383,16 @@
 -------------------------------------------------------------------------------
 COI16 - Code import Python:                                      OK[ ]   NOK[ ]
 -------------------------------------------------------------------------------
+Testprocedure:
+  1) Download a python project, e.g. eric5
+     information at http://eric-ide.python-projects.org/
+     source code at http://sourceforge.net/projects/eric-ide/files/eric5/stable/
+  2) Import all or only some single files.
+Testresult:
+  1) The code is parsed and imported as expected.
+  2) All classes are found.
+  3) All methods are found with the right parameters.
+  4) All attributes are found.
 
 -------------------------------------------------------------------------------
 COI17 - Code import Ruby:                                        OK[ ]   NOK[ ]
--- branches/work/soc-umbrello/umbrello/dialogs/umlviewdialog.cpp #1252911:1252912
@@ -180,12 +180,13 @@
     }
     else if ( item == m_pageColorItem )
     {
+        uDebug() << "setting colors ";
         m_pColorPage->updateUMLWidget();
         m_pScene->setUseFillColor( m_options.uiState.useFillColor );
         m_pScene->setLineColor( m_options.uiState.lineColor );
         m_pScene->setFillColor( m_options.uiState.fillColor );
         //:TODO:
-        // m_pScene->setGridDotColor(...);
+        m_pScene->setGridDotColor(m_options.uiState.gridDotColor);
         // gridCrossColor, gridTextColor, gridTextFont, gridTextIsVisible
     }
     else if ( item == m_pageFontItem )
--- branches/work/soc-umbrello/umbrello/uml.cpp #1252911:1252912
@@ -911,8 +911,8 @@
     UmbrelloSettings::setTextColor( optionState.uiState.textColor );
     UmbrelloSettings::setShowDocWindow(  m_documentationDock->isVisible() );
     UmbrelloSettings::setUiFont(  optionState.uiState.font );
-//:TODO:    UmbrelloSettings::setBackgroundColor( optionState.uiState.backgroundColor );
-//:TODO:    UmbrelloSettings::setGridDotColor( optionState.uiState.gridDotColor );
+    UmbrelloSettings::setBackgroundColor( optionState.uiState.backgroundColor );
+    UmbrelloSettings::setGridDotColor( optionState.uiState.gridDotColor );
 
     UmbrelloSettings::setShowVisibility(  optionState.classState.showVisibility );
     UmbrelloSettings::setShowAtts( optionState.classState.showAtts);
@@ -1883,8 +1883,8 @@
     optionState.uiState.lineWidth =  UmbrelloSettings::lineWidth();
     optionState.uiState.textColor = UmbrelloSettings::textColor();
     optionState.uiState.font =  UmbrelloSettings::uiFont();
-//:TODO:    optionState.uiState.backgroundColor = UmbrelloSettings::backgroundColor();
-//:TODO:    optionState.uiState.gridDotColor = UmbrelloSettings::gridDotColor();
+    optionState.uiState.backgroundColor = UmbrelloSettings::backgroundColor();
+    optionState.uiState.gridDotColor = UmbrelloSettings::gridDotColor();
 
     optionState.classState.showVisibility =  UmbrelloSettings::showVisibility();
     optionState.classState.showAtts =  UmbrelloSettings::showAtts();
--- branches/work/soc-umbrello/umbrello/umllistview.cpp #1252911:1252912
@@ -230,6 +230,12 @@
 
     // Get the UMLListViewItem at the point where the mouse pointer was pressed
     UMLListViewItem * item = static_cast<UMLListViewItem*>(itemAt(me->pos()));
+    if (item) {
+        DEBUG(DBG_SRC) << UMLListViewItem::toString(item->type());
+    }
+    else {
+        DEBUG(DBG_SRC) << "item is NULL";
+    }
 
     const Qt::ButtonState button = me->button();
 
@@ -247,6 +253,7 @@
 
         m_dragStartPosition = me->pos();
     }
+
     if (button == Qt::RightButton) {
         if (m_menu != 0) {
             m_menu->hide();
@@ -3174,6 +3181,7 @@
 
 /**
  * Deletes all child-items of @p parent.
+ * Do it in reverse order, because of the index.
  */
 void UMLListView::deleteChildrenOf(UMLListViewItem* parent)
 {
@@ -3181,7 +3189,7 @@
         return;
     }
     DEBUG(DBG_SRC) << parent->text(0) << ":";  //:TODO:
-    for (int i = 0; i < parent->childCount(); ++i) {
+    for (int i = parent->childCount() - 1; i >= 0; --i) {
         UMLListViewItem* child = static_cast<UMLListViewItem*>(parent->child(i));
         // if child has children, then delete them first
         if (child->childCount() > 0) {
--- branches/work/soc-umbrello/umbrello/umlscene.cpp #1252911:1252912
@@ -295,6 +295,8 @@
 void UMLScene::setGridDotColor(const QColor &gridColor)
 {
     m_layoutGrid->setGridDotColor(gridColor);
+    m_layoutGrid->setGridCrossColor(gridColor);
+    m_layoutGrid->setTextColor(gridColor);
 }
 
 /**




More information about the umbrello-devel mailing list