[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sun Feb 15 16:35:03 UTC 2004
CVS commit by okellogg:
Fix remainder of bug 73926.
M +4 -1 classifier.cpp 1.29
M +3 -1 classifier.h 1.25
M +1 -1 dialogs/umloperationdialog.cpp 1.24
--- kdesdk/umbrello/umbrello/classifier.cpp #1.28:1.29
@@ -31,5 +31,6 @@ UMLClassifier::~UMLClassifier() {
UMLOperation * UMLClassifier::checkOperationSignature( QString name,
- UMLAttributeList *opParams )
+ UMLAttributeList *opParams,
+ UMLOperation *exemptOp)
{
UMLObjectList list = findChildObject( Uml::ot_Operation, name );
@@ -42,4 +43,6 @@ UMLOperation * UMLClassifier::checkOpera
test = dynamic_cast<UMLOperation*>(list.next()) )
{
+ if (test == exemptOp)
+ continue;
UMLAttributeList *testParams = test->getParmList( );
if( testParams->count() != opParams->count() )
--- kdesdk/umbrello/umbrello/classifier.h #1.24:1.25
@@ -97,9 +97,11 @@ public:
* @param name Name of the operation to check.
* @param opParams Pointer to the method argument list.
+ * @param exemptOp Pointer to the exempt method (optional.)
* @return NULL if the signature is valid (ok), else return a pointer
* to the existing UMLOperation that causes the conflict.
*/
UMLOperation * checkOperationSignature( QString name,
- UMLAttributeList *opParams );
+ UMLAttributeList *opParams,
+ UMLOperation *exemptOp = NULL);
/**
--- kdesdk/umbrello/umbrello/dialogs/umloperationdialog.cpp #1.23:1.24
@@ -334,5 +334,5 @@ bool UMLOperationDialog::apply()
UMLClassifier *classifier = dynamic_cast<UMLClassifier*>( m_pOperation->parent() );
if( classifier != 0L &&
- classifier->checkOperationSignature(name, m_pOperation->getParmList()) )
+ classifier->checkOperationSignature(name, m_pOperation->getParmList(), m_pOperation) )
{
QString msg = QString(i18n("An operation with that signature already exists in %1.\n")).arg(classifier->getName())
More information about the umbrello-devel
mailing list