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

Andi Fischer andi.fischer at hispeed.ch
Fri Oct 3 07:35:03 UTC 2008


SVN commit 867239 by fischer:

Porting r867238.

 M  +6 -6      assocrules.cpp  
 M  +2 -3      model_utils.cpp  
 M  +1 -1      uml.cpp  


--- branches/work/soc-umbrello/umbrello/assocrules.cpp #867238:867239
@@ -54,7 +54,7 @@
 {
     Widget_Type widgetType = widget->baseType();
     bool bValid = false;
-    for (int i = 0; i < m_nNumRules; i++) {
+    for (int i = 0; i < m_nNumRules; ++i) {
         if (assocType == m_AssocRules[i].assoc_type) {
             if (widgetType == m_AssocRules[i].widgetA_type
                     || widgetType == m_AssocRules[i].widgetB_type ) {
@@ -153,7 +153,7 @@
         return allowSelf( assocType, widgetTypeA );
     }
 
-    for (int i = 0; i < m_nNumRules; i++) {
+    for (int i = 0; i < m_nNumRules; ++i) {
         if (assocType == m_AssocRules[i].assoc_type) {
             if( (widgetTypeA == m_AssocRules[i].widgetA_type &&
                     widgetTypeB == m_AssocRules[i].widgetB_type) ||
@@ -304,7 +304,7 @@
  */
 bool AssocRules::allowRole( Uml::Association_Type assocType )
 {
-    for( int i = 0; i < m_nNumRules; i++ )
+    for( int i = 0; i < m_nNumRules; ++i )
         if( assocType == m_AssocRules[ i ].assoc_type )
             return m_AssocRules[ i ].role;
     return false;
@@ -316,7 +316,7 @@
  */
 bool AssocRules::allowMultiplicity( Uml::Association_Type assocType, Uml::Widget_Type widgetType )
 {
-    for( int i = 0; i < m_nNumRules; i++ )
+    for( int i = 0; i < m_nNumRules; ++i )
         if( assocType == m_AssocRules[ i ].assoc_type )
             if( widgetType == m_AssocRules[ i ].widgetA_type || widgetType == m_AssocRules[ i ].widgetB_type )
                 return m_AssocRules[ i ].multiplicity;
@@ -328,7 +328,7 @@
  */
 bool AssocRules::allowSelf( Uml::Association_Type assocType, Uml::Widget_Type widgetType )
 {
-    for( int i = 0; i < m_nNumRules; i++ )
+    for( int i = 0; i < m_nNumRules; ++i )
         if( assocType == m_AssocRules[ i ].assoc_type )
             if( widgetType == m_AssocRules[ i ].widgetA_type || widgetType == m_AssocRules[ i ].widgetB_type )
                 return m_AssocRules[ i ].self;
@@ -345,7 +345,7 @@
 {
     Widget_Type widgetTypeA = widgetA->baseType();
     Widget_Type widgetTypeB = widgetB->baseType();
-    for (int i = 0; i < m_nNumRules; i++) {
+    for (int i = 0; i < m_nNumRules; ++i) {
         if (m_AssocRules[i].assoc_type == at_Realization &&
                 widgetTypeA == m_AssocRules[i].widgetA_type &&
                 widgetTypeB == m_AssocRules[i].widgetB_type) {
--- branches/work/soc-umbrello/umbrello/model_utils.cpp #867238:867239
@@ -1,5 +1,4 @@
 /***************************************************************************
- *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
  *   the Free Software Foundation; either version 2 of the License, or     *
@@ -318,7 +317,7 @@
     }
     UMLDoc *doc = UMLApp::app()->getDocument();
     QString name = currentName;
-    for (int number = 1; !doc->isUnique(name, parentPkg); number++)  {
+    for (int number = 1; !doc->isUnique(name, parentPkg); ++number)  {
         name = currentName + '_' + QString::number(number);
     }
     return name;
@@ -440,7 +439,7 @@
             {
                 UMLAssociation *assoc = static_cast<UMLAssociation*>(o);
                 UMLDoc *umldoc = UMLApp::app()->getDocument();
-                for (int r = Uml::A; r <= Uml::B; r++) {
+                for (int r = Uml::A; r <= Uml::B; ++r) {
                     UMLObject *roleObj = assoc->getObject((Uml::Role_Type)r);
                     if (roleObj == NULL) {
                         // Ouch! we have been called while types are not yet resolved
--- branches/work/soc-umbrello/umbrello/uml.cpp #867238:867239
@@ -2416,7 +2416,7 @@
 void UMLApp::updateLangSelectMenu(Uml::Programming_Language activeLanguage)
 {
     //m_langSelect->clear();
-    for (int i = 0; i < Uml::pl_Reserved; i++) {
+    for (int i = 0; i < Uml::pl_Reserved; ++i) {
         m_langAct[i]->setChecked(i == activeLanguage);
     }
 }




More information about the umbrello-devel mailing list