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

Oliver Kellogg okellogg at users.sourceforge.net
Wed Jan 10 23:05:06 UTC 2007


SVN commit 622189 by okellogg:

addAttribute(): Use different UMLAttribute constructor to avoid creating
dummy datatype "int".


 M  +5 -1      classifier.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/classifier.cpp #622188:622189
@@ -26,6 +26,7 @@
 #include "umldoc.h"
 #include "uml.h"
 #include "umllistview.h"
+#include "uniqueid.h"
 #include "object_factory.h"
 #include "model_utils.h"
 #include "uniqueid.h"
@@ -533,7 +534,10 @@
 }
 
 UMLAttribute* UMLClassifier::addAttribute(const QString &name, UMLObject *type, Uml::Visibility scope) {
-    UMLAttribute *a = new UMLAttribute(this, name, Uml::id_None, scope);
+    UMLAttribute *a = new UMLAttribute(this);
+    a->setName(name);
+    a->setVisibility(scope);
+    a->setID(UniqueID::gen());
     if (type)
         a->setType(type);
     m_List.append(a);




More information about the umbrello-devel mailing list