[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Wed Apr 14 17:13:04 UTC 2004


CVS commit by okellogg: 

Hmm, interesting. "using namespace std" appears not to be needed anymore.


  M +10 -5     associationwidget.cpp   1.91
  M +2 -1      linepath.cpp   1.28


--- kdesdk/umbrello/umbrello/associationwidget.cpp  #1.90:1.91
@@ -7,4 +7,5 @@
  *                                                                         *
  ***************************************************************************/
+#include <cstdlib>
 #include <cmath>
 
@@ -28,5 +29,5 @@
 #include <klocale.h>
 
-using namespace std;
+// using namespace std;  CHECK: strange... it compiles without this for me.
 
 // this constructor really only for loading from XMI, otherwise it
@@ -2759,8 +2760,12 @@ QRect AssociationWidget::getAssocLineRec
                 if (p.y() < rectangle.y())
                         rectangle.setY(p.y());
-                if (p.x() > rectangle.x() + rectangle.width())
-                        rectangle.setWidth(abs((int)(p.x() - rectangle.x() + pen_width)));
-                if (p.y() > rectangle.y() + rectangle.height())
-                        rectangle.setHeight(abs((int)(p.y() - rectangle.y() + pen_width)));
+                if (p.x() > rectangle.x() + rectangle.width()) {
+                        int newX = p.x() - rectangle.x() + pen_width;
+                        rectangle.setWidth(abs(newX));
+                }
+                if (p.y() > rectangle.y() + rectangle.height()) {
+                        int newY = p.y() - rectangle.y() + pen_width;
+                        rectangle.setHeight(abs(newY));
+                }
         }
         return rectangle;

--- kdesdk/umbrello/umbrello/linepath.cpp  #1.27:1.28
@@ -7,4 +7,5 @@
  *                                                                         *
  ***************************************************************************/
+#include <cstdlib>
 #include <cmath>
 
@@ -23,5 +24,5 @@
 #include "linepath.h"
 
-using namespace std;
+// using namespace std;  CHECK: strange... it compiles without this for me.
 
 LinePath::Circle::Circle(QCanvas * canvas, int radius /* = 0 */)






More information about the umbrello-devel mailing list