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

Oliver Kellogg okellogg at users.sourceforge.net
Sat Aug 11 23:49:46 UTC 2007


SVN commit 699086 by okellogg:

apply forgotten fixes from branches/KDE/3.5

 M  +1 -1      codegenerators/javaclassifiercodedocument.cpp  
 M  +2 -2      codegenerators/rubyclassifiercodedocument.cpp  
 M  +2 -3      codegenerators/simplecodegenerator.cpp  
 M  +14 -5     umlwidget.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/javaclassifiercodedocument.cpp #699085:699086
@@ -85,7 +85,7 @@
     QString path = getPackage();
 
     // Replace all white spaces with blanks
-    path.simplified();
+    path = path.simplified();
 
     // Replace all blanks with underscore
     path.replace(QRegExp(" "), "_");
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.cpp #699085:699086
@@ -75,14 +75,14 @@
 }
 */
 
-// We overwritten by Ruby language implementation to get lowercase path
+// Overwritten by Ruby language implementation to get lowercase path
 QString RubyClassifierCodeDocument::getPath ( )
 {
 
     QString path = getPackage();
 
     // Replace all white spaces with blanks
-    path.simplified();
+    path = path.simplified();
 
     // Replace all blanks with underscore
     path.replace(QRegExp(" "), "_");
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/simplecodegenerator.cpp #699085:699086
@@ -86,7 +86,7 @@
     QString package = concept->getPackage(".");
 
     // Replace all white spaces with blanks
-    package.simplified();
+    package = package.simplified();
 
     // Replace all blanks with underscore
     package.replace(QRegExp(" "), "_");
@@ -134,8 +134,7 @@
         }
     }
 
-
-    name.simplified();
+    name = name.simplified();
     name.replace(QRegExp(" "),"_");
 
     QString extension = ext.simplified();
--- trunk/KDE/kdesdk/umbrello/umbrello/umlwidget.cpp #699085:699086
@@ -736,7 +736,7 @@
 
     const QPoint pos(getX(), getY());
     UMLWidget *bkgnd = m_pView->getWidgetAt(pos);
-    if (bkgnd && _select) {
+    if (bkgnd && bkgnd != this && _select) {
         kDebug() << "UMLWidget::setSelected: setting Z to "
             << bkgnd->getZ() + 1 << ", SelectState: " << _select << endl;
         setZ( bkgnd->getZ() + 1 );
@@ -989,12 +989,13 @@
     qElement.setAttribute( "y", getY() );
     qElement.setAttribute( "width", getWidth() );
     qElement.setAttribute( "height", getHeight() );
-    qElement.setAttribute( "usesdiagramfillcolour", m_bUsesDiagramFillColour );
-    qElement.setAttribute( "usesdiagramusefillcolour", m_bUsesDiagramUseFillColour );
+    // for consistency the following attributes now use american spelling for "color"
+    qElement.setAttribute( "usesdiagramfillcolor", m_bUsesDiagramFillColour );
+    qElement.setAttribute( "usesdiagramusefillcolor", m_bUsesDiagramUseFillColour );
     if (m_bUsesDiagramFillColour) {
-        qElement.setAttribute( "fillcolour", "none" );
+        qElement.setAttribute( "fillcolor", "none" );
     } else {
-        qElement.setAttribute( "fillcolour", m_FillColour.name() );
+        qElement.setAttribute( "fillcolor", m_FillColour.name() );
     }
     qElement.setAttribute("isinstance", m_bIsInstance);
     if (!m_instanceName.isEmpty())
@@ -1012,9 +1013,17 @@
     QString y = qElement.attribute( "y", "0" );
     QString h = qElement.attribute( "height", "0" );
     QString w = qElement.attribute( "width", "0" );
+    /*
+      For the next three *color attributes, there was a mixup of american and english spelling for "color".
+      So first we need to keep backward compatibility and try to retrieve the *colour attribute.
+      Next we overwrite this value if we find a *color, otherwise the former *colour is kept.
+    */
     QString fillColour = qElement.attribute( "fillcolour", "none" );
+    fillColour = qElement.attribute( "fillcolor", fillColour );
     QString usesDiagramFillColour = qElement.attribute( "usesdiagramfillcolour", "1" );
+    usesDiagramFillColour = qElement.attribute( "usesdiagramfillcolor", usesDiagramFillColour );
     QString usesDiagramUseFillColour = qElement.attribute( "usesdiagramusefillcolour", "1" );
+    usesDiagramUseFillColour = qElement.attribute( "usesdiagramusefillcolor", usesDiagramUseFillColour );
 
     m_nId = STR2ID(id);
 




More information about the umbrello-devel mailing list