[Uml-devel] [Bug 96221] adding attribute in list view says Malformed argument
Oliver Kellogg
okellogg at users.sourceforge.net
Fri Jan 7 08:28:06 UTC 2005
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=96221
okellogg users sourceforge net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From okellogg users sourceforge net 2005-01-07 17:27 -------
CVS commit by okellogg:
Umbrello::parseAttribute(): Allow missing type in input string (type defaults to "int")
BUG:96221
M +1 -1 ChangeLog 1.56
M +8 -8 umbrello/model_utils.cpp 1.17
M +2 -1 umbrello/umllistview.cpp 1.141
M +2 -1 umbrello/umllistviewitem.cpp 1.69
--- kdesdk/umbrello/ChangeLog #1.55:1.56
@ -23,5 +23,5 @
91433 91434 91494 91869 91922 92116 92123 92222 92300 92301
92781 92995 93122 93219 93297 93501 93595 93696 94173 94728
-94795 94883 95082 95252 95722 95924 95951 96216
+94795 94883 95082 95252 95722 95924 95951 96216 96221
Version 1.3
--- kdesdk/umbrello/umbrello/model_utils.cpp #1.16:1.17
@ -242,8 +242,7 @ Parse_Status parseAttribute(QString a, N
QStringList nameAndType = QStringList::split( QRegExp("\\s*:\\s*"), a);
- if (nameAndType.count() != 2)
- return PS_Malformed_Arg;
-
- UMLObject *pType = owningScope->findTemplate(nameAndType[1]);
+ UMLObject *pType = NULL;
+ if (nameAndType.count() == 2) {
+ pType = owningScope->findTemplate(nameAndType[1]);
if (pType == NULL) {
pType = pDoc->findUMLObject(nameAndType[1], Uml::ot_UMLObject, owningScope);
@ -251,4 +250,5 @ Parse_Status parseAttribute(QString a, N
return PS_Unknown_ArgType;
}
+ }
nmTpPair = NameAndType(nameAndType[0], pType);
return PS_OK;
--- kdesdk/umbrello/umbrello/umllistview.cpp #1.140:1.141
@ -2193,4 +2193,5 @ bool UMLListView::createChildUMLObject(
newObject = m_doc->createAttribute( owningClass, nt.first );
UMLAttribute *att = static_cast<UMLAttribute*>(newObject);
+ if (nt.second)
att->setType(nt.second);
text = att->toString(Uml::st_SigNoScope);
--- kdesdk/umbrello/umbrello/umllistviewitem.cpp #1.68:1.69
@ -424,4 +424,5 @ void UMLListViewItem::okRename( int col
m_pObject->setName(nt.first);
UMLAttribute *pAtt = static_cast<UMLAttribute*>(m_pObject);
+ if (nt.second)
pAtt->setType(nt.second);
m_Label = pAtt->toString(Uml::st_SigNoScope);
More information about the umbrello-devel
mailing list