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

Andi Fischer andi.fischer at hispeed.ch
Wed Oct 1 10:11:37 UTC 2008


SVN commit 866559 by fischer:

Krazy: fixing postfix usage of ++ and --.

 M  +5 -4      association.cpp  
 M  +2 -2      import_rose.cpp  
 M  +6 -6      petaltree2uml.cpp  
 M  +3 -3      umlviewimageexportermodel.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/association.cpp #866558:866559
@@ -226,7 +226,7 @@
         m_AssocType == Uml::at_Child2Category ||
         m_AssocType == Uml::at_Category2Parent
         ) {
-        for (unsigned r = Uml::A; r <= Uml::B; r++) {
+        for (unsigned r = Uml::A; r <= Uml::B; ++r) {
             const QString fetch = (m_AssocType == Uml::at_Generalization ?
                                    r == Uml::A ? "child" : "parent"
                        : r == Uml::A ? "client" : "supplier");
@@ -404,7 +404,7 @@
         };
 
         unsigned index;
-        for (index = 0; index < nAssocTypes; index++)
+        for (index = 0; index < nAssocTypes; ++index)
             if (assocTypeStr == assocTypeString[index])
                 break;
         if (index < nAssocTypes)
@@ -499,10 +499,11 @@
 }
 
 /* CURRENTLY UNUSED
-Uml::IDType UMLAssociation::getRoleId(Role_Type role) const {
+Uml::IDType UMLAssociation::getRoleId(Role_Type role) const
+{
     return m_pRole[role]->getID();
 }
- */
+*/
 
 Uml::Changeability_Type UMLAssociation::getChangeability(Uml::Role_Type role) const
 {
--- trunk/KDE/kdesdk/umbrello/umbrello/import_rose.cpp #866558:866559
@@ -64,7 +64,7 @@
     QString lexeme;
     const uint len = line.length();
     bool inString = false;
-    for (uint i = 0; i < len; i++) {
+    for (uint i = 0; i < len; ++i) {
         QChar c = line[i];
         if (c == '"') {
             lexeme += c;
@@ -192,7 +192,7 @@
         return QString();
     }
     if (! line.isEmpty()) {
-        for (int i = 0; i < line.length(); i++) {
+        for (int i = 0; i < line.length(); ++i) {
             const QChar& clParenth = line[i];
             if (clParenth != ')') {
                 uError() << loc() << "expected ')', found: " << clParenth;
--- trunk/KDE/kdesdk/umbrello/umbrello/petaltree2uml.cpp #866558:866559
@@ -163,7 +163,7 @@
             return;
         }
         PetalNode::NameValueList attributeList = attributes->attributes();
-        for (int i = 0; i < attributeList.count(); i++) {
+        for (int i = 0; i < attributeList.count(); ++i) {
             PetalNode *attNode = attributeList[i].second.node;
             QStringList initialArgs = attNode->initialArgs();
             if (attNode->name() != m_elementName) {
@@ -365,7 +365,7 @@
         if (logical_models) {
             UMLPackage *localParent = static_cast<UMLPackage*>(o);
             PetalNode::NameValueList atts = logical_models->attributes();
-            for (int i = 0; i < atts.count(); i++) {
+            for (int i = 0; i < atts.count(); ++i) {
                 umbrellify(atts[i].second.node, localParent);
             }
         } else if (!handleControlledUnit(node, name, id, parentPkg)) {
@@ -406,7 +406,7 @@
         }
         UMLAssociation *assoc = new UMLAssociation(Uml::at_UniAssociation);
         PetalNode::NameValueList roleList = roles->attributes();
-        for (uint i = 0; i <= 1; i++) {
+        for (uint i = 0; i <= 1; ++i) {
             PetalNode *roleNode = roleList[i].second.node;
             if (roleNode == NULL) {
                 uError() << "umbrellify: roleNode of Association is NULL";
@@ -549,7 +549,7 @@
     PetalNode *models = node->findAttribute(modelsName).node;
     if (models) {
         PetalNode::NameValueList atts = models->attributes();
-        for (int i = 0; i < atts.count(); i++) {
+        for (int i = 0; i < atts.count(); ++i) {
             if (! umbrellify(atts[i].second.node, modelsName, item))
                 return false;
         }
@@ -582,7 +582,7 @@
         return false;
     }
     PetalNode::NameValueList atts = models->attributes();
-    for (int i = 0; i < atts.count(); i++) {
+    for (int i = 0; i < atts.count(); ++i) {
         umbrellify(atts[i].second.node, modelsName, lvParent);
     }
     return true;
@@ -617,7 +617,7 @@
     umldoc->setCurrentRoot(Uml::mt_Logical);
     Import_Utils::assignUniqueIdOnCreation(false);
     PetalNode::NameValueList atts = logical_models->attributes();
-    for (int i = 0; i < atts.count(); i++) {
+    for (int i = 0; i < atts.count(); ++i) {
         umbrellify(atts[i].second.node);
     }
 
--- trunk/KDE/kdesdk/umbrello/umbrello/umlviewimageexportermodel.cpp #866558:866559
@@ -53,7 +53,7 @@
         QList<QByteArray> qImageFormats = QImageWriter::supportedImageFormats();
         QList<QByteArray>::const_iterator it, it_end;
         it = qImageFormats.begin(); it_end = qImageFormats.end();
-        for (; it != it_end; it++) {
+        for (; it != it_end; ++it) {
             supportedImageTypesList << QString(*it).toLower();
         }
     }
@@ -65,7 +65,7 @@
 {
     if (!supportedMimeTypesList.size()) {
         QStringList imageTypes = UMLViewImageExporterModel::supportedImageTypes();
-        for(QStringList::Iterator it = imageTypes.begin(); it != imageTypes.end(); ++it ) {
+        for (QStringList::Iterator it = imageTypes.begin(); it != imageTypes.end(); ++it) {
             QString mimeType = imageTypeToMimeType(*it);
             if (!mimeType.isNull())
                 supportedMimeTypesList.append(mimeType);
@@ -201,7 +201,7 @@
 
     // creates the directory and any needed parent directories
     QStringList dirs = url.directory().split(QDir::separator(), QString::SkipEmptyParts );
-    for (QStringList::ConstIterator it = dirs.begin() ; it != dirs.end(); ++it ) {
+    for (QStringList::ConstIterator it = dirs.begin() ; it != dirs.end(); ++it) {
         directory.addPath(*it);
 
         if (!KIO::NetAccess::exists(directory, KIO::NetAccess::SourceSide, UMLApp::app())) {




More information about the umbrello-devel mailing list