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

Andi Fischer andi.fischer at hispeed.ch
Thu Feb 28 20:34:36 UTC 2008


SVN commit 780334 by fischer:

Krazy Code Checker: inappropriate pass-by-value.

 M  +2 -2      codegenerator.cpp  
 M  +1 -1      codegenerator.h  
 M  +3 -3      codegenerators/javawriter.cpp  
 M  +3 -3      codegenerators/javawriter.h  
 M  +1 -1      dialogs/classpropdlg.cpp  
 M  +1 -1      dialogs/classpropdlg.h  
 M  +2 -2      dialogs/exportallviewsdialog.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerator.cpp #780333:780334
@@ -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>                  *
  ***************************************************************************/
 
@@ -194,7 +194,7 @@
 }
 
 // probably we have code which was entered in classpropdlg for an operation
-void CodeGenerator::loadCodeForOperation(const QString& idStr, QDomElement codeDocElement)
+void CodeGenerator::loadCodeForOperation(const QString& idStr, const QDomElement& codeDocElement)
 {
     Uml::IDType id = STR2ID(idStr);
     UMLObject *obj = m_document->findObjectById(id);
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerator.h #780333:780334
@@ -402,7 +402,7 @@
     /**
      * Extract and load code for operations from xmi section.
      */
-    void loadCodeForOperation(const QString& id, QDomElement codeDocElement);
+    void loadCodeForOperation(const QString& id, const QDomElement& codeDocElement);
 
 public slots:
 
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/javawriter.cpp #780333:780334
@@ -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>
 ***************************************************************************/
 
 /***************************************************************************
@@ -873,7 +873,7 @@
     }
 }
 
-QString JavaWriter::fixInitialStringDeclValue(const QString& val, QString type)
+QString JavaWriter::fixInitialStringDeclValue(const QString& val, const QString& type)
 {
     QString value = val;
     // check for strings only
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/javawriter.h #780333:780334
@@ -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
-         (C) 2004  Umbrello UML Modeller Authors <uml-devel at uml.sf.net>
+    (C) 2003 Brian Thomas
+    (C) 2008  Umbrello UML Modeller Authors <uml-devel at uml.sf.net>
  ***************************************************************************/
 
 /***************************************************************************
@@ -210,7 +210,7 @@
     /**
      * Check that initial values of strings have quotes around them.
      */
-    QString fixInitialStringDeclValue(const QString& val, QString type);
+    QString fixInitialStringDeclValue(const QString& val, const QString& type);
 
     /**
      * Write a blank line.
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/classpropdlg.cpp #780333:780334
@@ -207,7 +207,7 @@
     }
 }
 
-QFrame* ClassPropDlg::createPage(const QString name, const QString header, Icon_Utils::Icon_Type icon)
+QFrame* ClassPropDlg::createPage(const QString& name, const QString& header, Icon_Utils::Icon_Type icon)
 {
     QFrame* page = new QFrame();
     KPageWidgetItem *pageItem = new KPageWidgetItem( page, name );
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/classpropdlg.h #780333:780334
@@ -194,7 +194,7 @@
 
     void init();
 
-    QFrame* createPage(const QString name, const QString header, Icon_Utils::Icon_Type icon);
+    QFrame* createPage(const QString& name, const QString& header, Icon_Utils::Icon_Type icon);
 
 };
 
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/exportallviewsdialog.cpp #780333:780334
@@ -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>                  *
  ***************************************************************************/
 
@@ -28,7 +28,7 @@
         const char* name /* = 0 */,
         bool modal /* = false */,
         Qt::WindowFlags fl /* = 0*/,
-        const QString &defaultMimeType /*= "image/png"*/)
+        const QString& defaultMimeType /*= "image/png"*/)
   : QDialog(parent,fl) {
 
     setObjectName(name);




More information about the umbrello-devel mailing list