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

Andi Fischer andi.fischer at hispeed.ch
Thu Feb 28 19:46:00 UTC 2008


SVN commit 780320 by fischer:

Krazy Code Checker: single char QString better written as a QChar.

 M  +3 -3      codegenerators/cppsourcecodeclassfielddeclarationblock.cpp  
 M  +4 -4      codegenerators/cppwriter.cpp  
 M  +3 -3      codeimport/pythonimport.cpp  
 M  +1 -1      uml.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.cpp #780319:780320
@@ -5,7 +5,7 @@
  *   the Free Software Foundation; either version 2 of the License, or     *
  *   (at your option) any later version.                                   *
  *                                                                         *
- *   copyright (C) 2004-2007                                               *
+ *   copyright (C) 2004-2008                                               *
  *   Umbrello UML Modeller Authors <uml-devel at uml.sf.net>                  *
  ***************************************************************************/
 
@@ -57,10 +57,10 @@
     QString fieldName = jcf->getFieldName();
     QString initialV = jcf->getInitialValue();
 
-    QString body = staticValue+scopeStr+" "+typeName+" "+fieldName;
+    QString body = staticValue+scopeStr + ' ' + typeName + ' ' + fieldName;
     if (!initialV.isEmpty())
             body.append(" = " + initialV);
-    setText(body+";");
+    setText(body + ';');
 
 }
 
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/cppwriter.cpp #780319:780320
@@ -4,8 +4,8 @@
  *  in the Modeller but uses significantly less file space because the     *
  *  source code is not replicated in the XMI file.                         *
  *                                                                         *
- *  copyright       : (C) 2003 Brian Thomas brian.thomas at gsfc.nasa.gov     *
- *  (C) 2004-2007  Umbrello UML Modeller Authors <uml-devel at uml.sf.net>    *
+ *  (C) 2003 Brian Thomas brian.thomas at gsfc.nasa.gov                       *
+ *  (C) 2004-2008  Umbrello UML Modeller Authors <uml-devel at uml.sf.net>    *
  *                                                                         *
  ***************************************************************************
  *                                                                         *
@@ -1120,7 +1120,7 @@
             str += ';'; // terminate now
         }
         else {
-            str += m_endl + getIndent() + "{" + m_endl;
+            str += m_endl + getIndent() + '{' + m_endl;
             QString sourceCode = op->getSourceCode();
             if (sourceCode.isEmpty()) {
                 // empty method body - TODO: throw exception
@@ -1128,7 +1128,7 @@
             else {
                 str += formatSourceCode(sourceCode, getIndent() + getIndent());
             }
-            str += getIndent() + "}";
+            str += getIndent() + '}';
         }
 
         // write it out
--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/pythonimport.cpp #780319:780320
@@ -5,7 +5,7 @@
  *   the Free Software Foundation; either version 2 of the License, or     *
  *   (at your option) any later version.                                   *
  *                                                                         *
- *  copyright (C) 2006-2007                                                *
+ *  copyright (C) 2006-2008                                                *
  *  Umbrello UML Modeller Authors <uml-devel at uml.sf.net>                   *
  ***************************************************************************/
 
@@ -137,14 +137,14 @@
             if (braceNesting <= 0)
                 break;
             braceNesting--;
-            body += "\n";
+            body += '\n';
             firstTokenAfterNewline = true;
         } else if (token == "{") {
             braceNesting++;
             body += ":\n";
             firstTokenAfterNewline = true;
         } else if (token == ";") {
-            body += "\n";
+            body += '\n';
             firstTokenAfterNewline = true;
         } else {
             if (firstTokenAfterNewline) {
--- trunk/KDE/kdesdk/umbrello/umbrello/uml.cpp #780319:780320
@@ -524,7 +524,7 @@
     //IMPORTANT: The zoom value is added to the action.
     QAction* action = new QAction(this);
     action->setCheckable(true);
-    action->setText(" &" + QString::number(zoom) + "%");
+    action->setText(" &" + QString::number(zoom) + '%');
     action->setData(zoom);
     if (zoom == currentZoom)
         action->setChecked(true);




More information about the umbrello-devel mailing list