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

Oliver Kellogg okellogg at users.sourceforge.net
Mon Jan 1 16:02:23 UTC 2007


SVN commit 618574 by okellogg:

Fix adding single char string to a QString (Krazy #4, cont'd)

 M  +1 -1      association.cpp  
 M  +1 -1      classifier.cpp  
 M  +1 -1      codegenerator.cpp  
 M  +1 -1      codegenerators/cppheadercodeaccessormethod.cpp  
 M  +1 -1      codegenerators/cppheadercodeoperation.cpp  
 M  +1 -1      codegenerators/cppsourcecodeaccessormethod.cpp  
 M  +1 -1      codegenerators/cppwriter.cpp  
 M  +1 -1      codegenerators/javaclassifiercodedocument.cpp  
 M  +1 -1      codegenerators/javacodeaccessormethod.cpp  
 M  +1 -1      codegenerators/javacodeclassfielddeclarationblock.cpp  
 M  +1 -1      codegenerators/javacodeoperation.cpp  
 M  +1 -1      codegenerators/perlwriter.cpp  
 M  +1 -1      codegenerators/php5writer.cpp  
 M  +1 -1      codegenerators/pythonwriter.cpp  
 M  +1 -1      codegenerators/rubycodeoperation.cpp  
 M  +1 -1      codegenerators/rubywriter.cpp  
 M  +1 -1      codegenerators/simplecodegenerator.cpp  
 M  +1 -1      codegenerators/tclwriter.cpp  
 M  +1 -1      codegenerators/xmlschemawriter.cpp  
 M  +1 -1      codeimport/javaimport.cpp  
 M  +1 -1      codeimport/kdevcppparser/ast.cpp  
 M  +1 -1      codeimport/kdevcppparser/ast_utils.cpp  
 M  +1 -1      codeimport/kdevcppparser/lexer.cpp  
 M  +1 -1      codeimport/kdevcppparser/urlutil.cpp  
 M  +1 -1      dialogs/assocrolepage.cpp  
 M  +1 -1      dialogs/codeeditor.cpp  
 M  +1 -1      folder.cpp  
 M  +1 -1      operation.cpp  
 M  +1 -1      umldoc.cpp  
 M  +1 -1      umllistview.cpp  
 M  +1 -1      umlviewimageexporter.cpp  
 M  +1 -1      umlviewimageexportermodel.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/association.cpp #618573:618574
@@ -112,7 +112,7 @@
         string += ":";
         string += m_pRole[A]->getName();
     }
-    string += ":" + typeAsString(m_AssocType) + ":";
+    string += ':' + typeAsString(m_AssocType) + ':';
     if(m_pRole[B])
     {
         string += m_pRole[B]->getObject( )->getName();
--- trunk/KDE/kdesdk/umbrello/umbrello/classifier.cpp #618573:618574
@@ -220,7 +220,7 @@
         UMLClassifierListItem* currentAtt;
         QString buf;
         for (UMLClassifierListItemListIt it0(itemList); (currentAtt = it0.current()); ++it0)
-            buf.append(" " + currentAtt->getName());
+            buf.append(' ' + currentAtt->getName());
         kDebug() << "  UMLClassifier::addOperation list after change: " << buf << endl;
      } else
         m_List.append( op );
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerator.cpp #618573:618574
@@ -503,7 +503,7 @@
     if (!path.isEmpty()) {
         path.replace(QRegExp("::"), "/"); // Simple hack!
         name = path + "/" + codeDocument->getFileName();
-        path = "/" + path;
+        path = '/' + path;
     } else {
         name = codeDocument->getFileName();
     }
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.cpp #618573:618574
@@ -149,7 +149,7 @@
     setComment(header);
 
     // set start/end method text
-    QString startText = methodReturnType + " " + methodName + " (" + methodParams +')';
+    QString startText = methodReturnType + ' ' + methodName + " (" + methodParams +')';
     if (isInlineMethod)
         startText += " {";
     else
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/cppheadercodeoperation.cpp #618573:618574
@@ -119,7 +119,7 @@
         methodReturnType = QString("void");
 
     // set start/end method text
-    QString prototype = methodReturnType+" "+methodName+" ("+paramStr+")";
+    QString prototype = methodReturnType+' '+methodName+" ("+paramStr+')';
 
     QString startText;
     QString endText;
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.cpp #618573:618574
@@ -77,7 +77,7 @@
         case CodeAccessorMethod::LIST:
         case CodeAccessorMethod::GET:
         default:
-            text = "return "+variableName+";";
+            text = "return "+variableName+';';
             break;
         }
     }
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/cppwriter.cpp #618573:618574
@@ -1172,7 +1172,7 @@
             str += "static ";
 
         // returntype of method
-        str += methodReturnType + " ";
+        str += methodReturnType + ' ';
 
         if (!isHeaderMethod)
             str += className + "::";
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/javaclassifiercodedocument.cpp #618573:618574
@@ -407,7 +407,7 @@
             {
                 importStatement.append(endLine+"import ");
                 if(!con->getPackage().isEmpty())
-                    importStatement.append(con->getPackage()+".");
+                    importStatement.append(con->getPackage()+'.');
                 importStatement.append(CodeGenerator::cleanName(con->getName())+';');
             }
         }
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/javacodeaccessormethod.cpp #618573:618574
@@ -111,7 +111,7 @@
             if(minOccurs > 0)
             {
                 text += endLine+"} else {"+endLine;
-                text += indent + "System.err.println(\"ERROR: Cant remove"+fieldType+" from "+fieldName+", minimum number of items reached.\");"+endLine+"}"+endLine;
+                text += indent + "System.err.println(\"ERROR: Cant remove"+fieldType+" from "+fieldName+", minimum number of items reached.\");"+endLine+'}'+endLine;
             }
             break;
         }
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.cpp #618573:618574
@@ -89,7 +89,7 @@
     if (!cf->parentIsAttribute() && !cf->fieldIsSingleValue())
         typeName = "List";
 
-    QString body = staticValue+scopeStr+" "+typeName+" "+fieldName;
+    QString body = staticValue+scopeStr+' '+typeName+' '+fieldName;
     if (!initialV.isEmpty())
         body.append(" = " + initialV);
     else if (!cf->parentIsAttribute())
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/javacodeoperation.cpp #618573:618574
@@ -99,7 +99,7 @@
     {
         UMLAttributeList parameters = o->getParmList();
         for(UMLAttributeListIt iterator(parameters); iterator.current(); ++iterator) {
-            comment += endLine + "@param " + iterator.current()->getName() + " ";
+            comment += endLine + "@param " + iterator.current()->getName() + ' ';
             comment += iterator.current()->getDoc();
         }
         // add a returns statement too
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/perlwriter.cpp #618573:618574
@@ -137,7 +137,7 @@
           return;
         }
       }
-      curDir += "/" + newDir;
+      curDir += '/' + newDir;
     }
     fileName = fragment + ".pm";
   }
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/php5writer.cpp #618573:618574
@@ -3300,7 +3300,7 @@
             php << m_endl << m_indentation << "} // end of member function " + cleanName(op->getName()) + m_endl;
         }
         else {
-            php << ";" + m_endl;
+            php << ';' + m_endl;
         }
         php << m_endl;
     }//end for
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/pythonwriter.cpp #618573:618574
@@ -91,7 +91,7 @@
     str = cleanName(c->getName()); 
     QString pkg = cleanName(c->getPackage());
     if (!pkg.isEmpty())
-        str.prepend(pkg + "."); 
+        str.prepend(pkg + '.'); 
     QStringList includesList  = QStringList(str); //save imported classes 
     int i = superclasses.count(); 
     for (UMLClassifier *classifier = superclasses.first(); 
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/rubycodeoperation.cpp #618573:618574
@@ -160,7 +160,7 @@
                 if (iterator.current()->getDoc().isEmpty()) {
                     comment += (" " + RubyCodeGenerator::cppToRubyType(iterator.current()->getTypeName()));
                 } else {
-                    comment += (" " + iterator.current()->getDoc().replace(QRegExp("[\\n\\r]+[\\t ]*"), endLine + "  "));
+                    comment += (' ' + iterator.current()->getDoc().replace(QRegExp("[\\n\\r]+[\\t ]*"), endLine + "  "));
                 }
             }
         }
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/rubywriter.cpp #618573:618574
@@ -292,7 +292,7 @@
                 if (commentedParams.contains(cppToRubyName(at->getName())) == 0) {
                     docStr += (m_endl + m_indentation + "# @param _" + cppToRubyName(at->getName()) + "_");
                     if (at->getDoc().isEmpty()) {
-                        docStr += (" " + cppToRubyType(at->getTypeName()));
+                        docStr += (' ' + cppToRubyType(at->getTypeName()));
                     } else {
                         docStr += (' ' + at->getDoc().replace(QRegExp("[\\n\\r]+[\\t ]*"), m_endl + "   "));
                     }
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/simplecodegenerator.cpp #618573:618574
@@ -99,7 +99,7 @@
         name = package + "." + concept->getName();
         name.replace(QRegExp("\\."),"/");
         package.replace(QRegExp("\\."), "/");
-        package = "/" + package;
+        package = '/' + package;
     } else {
         name = concept->getFullyQualifiedName("-");
     }
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/tclwriter.cpp #618573:618574
@@ -832,7 +832,7 @@
         QString         name = mClassGlobal + "::" + cleanName(at->getName());
 
         writeComm(name);
-        writeCode("configbody " + name + " {} {" + m_endl + "}" + m_endl);
+        writeCode("configbody " + name + " {} {" + m_endl + '}' + m_endl);
     }
 }
 
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/xmlschemawriter.cpp #618573:618574
@@ -771,7 +771,7 @@
 }
 
 QString XMLSchemaWriter::makePackageTag (QString tagName) {
-    tagName.prepend( packageNamespaceTag + ":");
+    tagName.prepend( packageNamespaceTag + ':');
     return tagName;
 }
 
--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/javaimport.cpp #618573:618574
@@ -156,7 +156,7 @@
         file.pop_back();
     }
     // this is now the root of any further source imports
-    QString sourceRoot = "/" + file.join("/") + "/";
+    QString sourceRoot = '/' + file.join("/") + '/';
 
     for (QStringList::Iterator pathIt = m_imports.begin();
                                    pathIt != m_imports.end(); ++pathIt) {
--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp #618573:618574
@@ -561,7 +561,7 @@
 QString ElaboratedTypeSpecifierAST::text() const
 {
     if( m_kind.get() )
-        return m_kind->text() + " " + TypeSpecifierAST::text();
+        return m_kind->text() + ' ' + TypeSpecifierAST::text();
 
     return TypeSpecifierAST::text();
 }
--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp #618573:618574
@@ -127,7 +127,7 @@
        for( Q3PtrListIterator<AST> it(ptrOpList); it.current(); ++it ){
 	  text += it.current()->text();
        }
-       text += " ";
+       text += ' ';
    }
 
    text += scope;
--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp #618573:618574
@@ -556,7 +556,7 @@
 	}
 
 	if( tk != -1 )
-            arg += tk.text() + " ";
+            arg += tk.text() + ' ';
     }
 
     return arg.trimmed();
--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp #618573:618574
@@ -242,7 +242,7 @@
     if (currDir.isEmpty() && currFile.isEmpty())
       break;
     else if (currDir.isEmpty())
-      result_down += file[i] + "/";
+      result_down += file[i] + '/';
     else if (currFile.isEmpty())
       result_up += "../";
     else
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/assocrolepage.cpp #618573:618574
@@ -56,7 +56,7 @@
     QString widgetNameA = m_pAssociationWidget->getWidget(Uml::A)->getName();
     QString widgetNameB = m_pAssociationWidget->getWidget(Uml::B)->getName();
     if(!widgetNameA.isEmpty())
-        titleA.append(" (" + widgetNameA + ")");
+        titleA.append(" (" + widgetNameA + ')');
     if(!widgetNameB.isEmpty())
         titleB.append(" (" + widgetNameB + ')');
 
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/codeeditor.cpp #618573:618574
@@ -913,7 +913,7 @@
         int minPos = baseIndent.length();
 
         // add indent chars to the current line, if missing
-        if(!m_backspacePressed && !currentParaText.contains(QRegExp("^"+baseIndent)))
+        if(!m_backspacePressed && !currentParaText.contains(QRegExp('^'+baseIndent)))
         {
             insertAt(baseIndent,para,0);
             setCursorPosition(para,pos+minPos);
--- trunk/KDE/kdesdk/umbrello/umbrello/folder.cpp #618573:618574
@@ -217,7 +217,7 @@
     // See if we can create the external file.
     // If not then internalize the folder.
     UMLDoc *umldoc = UMLApp::app()->getDocument();
-    QString fileName = umldoc->url().directory() + "/" + m_folderFile;
+    QString fileName = umldoc->url().directory() + '/' + m_folderFile;
     QFile file(fileName);
     if (!file.open(QIODevice::WriteOnly)) {
         kError() << "UMLFolder::saveToXMI(" << m_folderFile << "): "
--- trunk/KDE/kdesdk/umbrello/umbrello/operation.cpp #618573:618574
@@ -128,7 +128,7 @@
     QString s = "";
 
     if(sig == Uml::st_ShowSig || sig == Uml::st_NoSig) 
-          s = m_Vis.toString(true) + " ";
+          s = m_Vis.toString(true) + ' ';
     
     s += getName();
     if (!s.contains("("))
--- trunk/KDE/kdesdk/umbrello/umbrello/umldoc.cpp #618573:618574
@@ -2030,7 +2030,7 @@
     QString viewName = (QString)pView->getName();
     QString name = viewName;
     while( findView(pView->getType(), name) != NULL) {
-        name = viewName + "_" + QString::number(++i);
+        name = viewName + '_' + QString::number(++i);
     }
     if(i) //If name was modified
         pView->setName(name);
--- trunk/KDE/kdesdk/umbrello/umbrello/umllistview.cpp #618573:618574
@@ -391,7 +391,7 @@
             // Recompute text of the folder
             QString folderText = current->getText();
             folderText.remove( QRegExp("\\s*\\(.*$") );
-            folderText.append( " (" + fileName + ")" );
+            folderText.append( " (" + fileName + ')' );
             current->setText(folderText);
             break;
         }
--- trunk/KDE/kdesdk/umbrello/umbrello/umlviewimageexporter.cpp #618573:618574
@@ -97,7 +97,7 @@
     QString ext = info.extension(false);
     QString extDef = UMLViewImageExporterModel::mimeTypeToImageType(m_imageMimeType);
     if(ext != extDef) {
-        m_imageURL.setFileName(m_imageURL.fileName() + "." + extDef);
+        m_imageURL.setFileName(m_imageURL.fileName() + '.' + extDef);
     }
 
     return true;
--- trunk/KDE/kdesdk/umbrello/umbrello/umlviewimageexportermodel.cpp #618573:618574
@@ -160,7 +160,7 @@
 }
 
 QString UMLViewImageExporterModel::getDiagramFileName(UMLView *view, const QString &imageType, bool useFolders /* = false */) const {
-    QString name = view->getName() + "." + imageType.lower();
+    QString name = view->getName() + '.' + imageType.lower();
 
     if (!useFolders) {
         return name;




More information about the umbrello-devel mailing list