[Uml-devel] KDE_3_2_BRANCH: kdesdk/umbrello/umbrello

Sebastian Stein seb.kde at hpfsc.de
Wed Feb 18 08:24:07 UTC 2004


CVS commit by sstein: 

backport fix by O. Kellogg and T. H. Nielsen for bug #73926


  M +4 -1      classifier.cpp   1.27.2.1
  M +3 -1      classifier.h   1.23.2.1
  M +1 -1      dialogs/umloperationdialog.cpp   1.23.2.1


--- kdesdk/umbrello/umbrello/classifier.h  #1.23:1.23.2.1
@@ -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/classifier.cpp  #1.27:1.27.2.1
@@ -30,5 +30,6 @@ UMLClassifier::~UMLClassifier() {
 
 UMLOperation * UMLClassifier::checkOperationSignature( QString name,
-                                                       UMLAttributeList *opParams )
+                                                                                                                                UMLAttributeList *opParams,
+                                                                                                                                UMLOperation *exemptOp)
 {
         UMLObjectList list = findChildObject( Uml::ot_Operation, name );
@@ -41,4 +42,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/dialogs/umloperationdialog.cpp  #1.23:1.23.2.1
@@ -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