[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sun Aug 14 02:51:06 UTC 2005
SVN commit 449071 by okellogg:
Support case insensitive languages.
M +9 -2 classifier.cpp
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/classifier.cpp #449070:449071
@@ -110,6 +110,7 @@
UMLObjectList list = findChildObject(Uml::ot_Operation, name);
if (list.count() == 0)
return NULL;
+ const bool caseSensitive = UMLApp::app()->activeLanguageIsCaseSensitive();
// If there are operation(s) with the same name then compare the parameter list
const int inputParmCount = params.count();
UMLOperation* test = NULL;
@@ -129,7 +130,8 @@
if (c == NULL) { //template parameter
if (typeName != "class")
break;
- } else if (typeName != c->getName())
+ } else if ((caseSensitive && typeName != c->getName()) ||
+ (!caseSensitive && typeName.lower() != c->getName().lower()))
break;
}
if (i == pCount)
@@ -314,13 +316,18 @@
if (t == ot_Association) {
return UMLCanvasObject::findChildObject(t, n);
}
+ const bool caseSensitive = UMLApp::app()->activeLanguageIsCaseSensitive();
UMLObjectList list;
for (UMLClassifierListItemListIt lit(m_List); lit.current(); ++lit) {
UMLClassifierListItem* obj = lit.current();
if (obj->getBaseType() != t)
continue;
- if (obj->getName() == n)
+ if (caseSensitive) {
+ if (obj->getName() == n)
+ list.append( obj );
+ } else if (obj->getName().lower() == n.lower()) {
list.append( obj );
+ }
}
return list;
}
More information about the umbrello-devel
mailing list