[Uml-devel] branches/KDE/3.5/kdesdk/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Thu Sep 22 12:49:05 UTC 2005
SVN commit 463046 by okellogg:
findOperation(): Avoid comparing types by name because getTypeName() has its
own smarts about scope prefixing. Instead, use pointer comparison.
Thanks to Emil Karlen and Yurgen Wolfgang for their input.
BUG:110843
M +2 -2 ChangeLog
M +4 -6 umbrello/classifier.cpp
--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #463045:463046
@@ -11,8 +11,8 @@
* Bugs fixed / wishes implemented (see http://bugs.kde.org)
57588 57672 58809 66461 67120 67719 72016 79433 87252 88117
97162 101550 105564 108223 109591 109636 110073 110216 110231 110379
-111088 111470 111502 111759 111768 112017 112292 112293 112333 112531
-112552 112936 112991 112992
+110843 111088 111470 111502 111759 111768 112017 112292 112293 112333
+112531 112552 112936 112991 112992
Version 1.4.2 (maintenance release)
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/classifier.cpp #463045:463046
@@ -111,7 +111,6 @@
UMLOperationList list = findOperations(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;
@@ -125,13 +124,12 @@
int i = 0;
for (; i < pCount; ++i) {
Model_Utils::NameAndType_ListIt nt(params.at(i));
- UMLObject *c = (*nt).m_type;
- QString typeName = testParams->at(i)->getTypeName();
+ UMLClassifier *c = dynamic_cast<UMLClassifier*>((*nt).m_type);
+ UMLClassifier *testType = testParams->at(i)->getType();
if (c == NULL) { //template parameter
- if (typeName != "class")
+ if (testType->getName() != "class")
break;
- } else if ((caseSensitive && typeName != c->getName()) ||
- (!caseSensitive && typeName.lower() != c->getName().lower()))
+ } else if (c != testType)
break;
}
if (i == pCount)
More information about the umbrello-devel
mailing list