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

Oliver Kellogg okellogg at users.sourceforge.net
Sat Feb 17 22:45:15 UTC 2007


SVN commit 634664 by okellogg:

Use the new 'vis' arg of Model_Utils::parseAttribute().

 M  +4 -1      umllistview.cpp  
 M  +4 -1      umllistviewitem.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umllistview.cpp #634663:634664
@@ -2081,7 +2081,9 @@
     } else if (type == Uml::ot_Attribute || type == Uml::ot_EntityAttribute)  {
         UMLClassifier *owningClass = static_cast<UMLClassifier*>(parent);
         Model_Utils::NameAndType nt;
-        Model_Utils::Parse_Status st = Model_Utils::parseAttribute(text, nt, owningClass);
+        Uml::Visibility vis;
+        Model_Utils::Parse_Status st;
+        st = Model_Utils::parseAttribute(text, nt, owningClass, &vis);
         if (st) {
             KMessageBox::error( kapp->mainWidget(),
                                 Model_Utils::psText(st),
@@ -2092,6 +2094,7 @@
         newObject = owningClass->createAttribute(nt.m_name);
         UMLAttribute *att = static_cast<UMLAttribute*>(newObject);
         att->setType(nt.m_type);
+        att->setVisibility(vis);
         att->setParmKind(nt.m_direction);
         att->setInitialValue(nt.m_initialValue);
         text = att->toString(Uml::st_SigNoVis);
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umllistviewitem.cpp #634663:634664
@@ -381,7 +381,9 @@
             }
             UMLClassifier *parent = static_cast<UMLClassifier*>(m_pObject->parent());
             Model_Utils::NameAndType nt;
-            Model_Utils::Parse_Status st = Model_Utils::parseAttribute(newText, nt, parent);
+            Uml::Visibility vis;
+            Model_Utils::Parse_Status st;
+            st = Model_Utils::parseAttribute(newText, nt, parent, &vis);
             if (st == Model_Utils::PS_OK) {
                 UMLObject *exists = parent->findChildObject(newText);
                 if (exists) {
@@ -391,6 +393,7 @@
                 m_pObject->setName(nt.m_name);
                 UMLAttribute *pAtt = static_cast<UMLAttribute*>(m_pObject);
                 pAtt->setType(nt.m_type);
+                pAtt->setVisibility(vis);
                 pAtt->setParmKind(nt.m_direction);
                 pAtt->setInitialValue(nt.m_initialValue);
                 m_Label = pAtt->toString(Uml::st_SigNoVis);




More information about the umbrello-devel mailing list