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

Oliver Kellogg okellogg at users.sourceforge.net
Mon Jul 9 20:42:37 UTC 2007


SVN commit 685829 by okellogg:

a few more fixes for EBN Krazy #18 (inappropriate pass-by-value function args)

 M  +1 -1      associationwidget.cpp  
 M  +1 -1      associationwidget.h  
 M  +1 -1      codeblockwithcomments.cpp  
 M  +1 -1      codeblockwithcomments.h  
 M  +2 -2      codeclassfield.cpp  
 M  +1 -1      codeclassfield.h  


--- trunk/KDE/kdesdk/umbrello/umbrello/associationwidget.cpp #685828:685829
@@ -1470,7 +1470,7 @@
     8 = On diagonal 1 between Region 4 and 1
     9 = On diagonal 1 and On diagonal 2 (the center)
 */
-AssociationWidget::Region AssociationWidget::findPointRegion(QRect Rect, int PosX, int PosY) {
+AssociationWidget::Region AssociationWidget::findPointRegion(const QRect& Rect, int PosX, int PosY) {
     float w = (float)Rect.width();
     float h = (float)Rect.height();
     float x = (float)Rect.x();
--- trunk/KDE/kdesdk/umbrello/umbrello/associationwidget.h #685828:685829
@@ -687,7 +687,7 @@
      *          8 = On diagonal 1 between Region4 and 1
      *          9 = On diagonal 1 and On diagonal 2 (the center)
      */
-    static Region findPointRegion(QRect Rect, int PosX, int PosY);
+    static Region findPointRegion(const QRect& Rect, int PosX, int PosY);
 
     /**
      * Given a rectangle and a point, findInterceptOnEdge computes the
--- trunk/KDE/kdesdk/umbrello/umbrello/codeblockwithcomments.cpp #685828:685829
@@ -171,7 +171,7 @@
     m_comment->setIndentationLevel(level);
 }
 
-void CodeBlockWithComments::initFields(CodeDocument *parent, QString comment)
+void CodeBlockWithComments::initFields(CodeDocument *parent, const QString& comment)
 {
     CodeComment * codecomment = CodeGenFactory::newCodeComment(parent);
     codecomment->setText(comment);
--- trunk/KDE/kdesdk/umbrello/umbrello/codeblockwithcomments.h #685828:685829
@@ -100,7 +100,7 @@
 
     CodeComment * m_comment;
 
-    void initFields(CodeDocument *parent, QString comment);
+    void initFields(CodeDocument *parent, const QString& comment);
 
 };
 
--- trunk/KDE/kdesdk/umbrello/umbrello/codeclassfield.cpp #685828:685829
@@ -363,9 +363,9 @@
     return getParentDocument()->cleanName(name);
 }
 
-QString CodeClassField::fixInitialStringDeclValue(QString value, const QString &type)
+QString CodeClassField::fixInitialStringDeclValue(const QString& val, const QString &type)
 {
-    // check for strings only
+    // check for strings only<F2>String value = val;
     if (!value.isEmpty() && type == "String") {
         if (!value.startsWith('"'))
             value.prepend('"');
--- trunk/KDE/kdesdk/umbrello/umbrello/codeclassfield.h #685828:685829
@@ -177,7 +177,7 @@
      * this one fixes the initial declared value of string attributes so that if
      * its empty or lacking quotations, it comes out as ""
      */
-    QString fixInitialStringDeclValue(QString value, const QString &type);
+    QString fixInitialStringDeclValue(const QString& val, const QString &type);
 
     // set the list class name
     void setListClassName ( const QString &className );




More information about the umbrello-devel mailing list