[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sun Feb 5 11:47:01 UTC 2006
SVN commit 506103 by okellogg:
UMLRole::setIdStr(): Remove, use UMLObject::setSecondaryId() instead.
UMLAssociation destructor: It is not the association's responsibility
to remove itself from the document.
M +5 -10 association.cpp
M +2 -9 umlrole.cpp
M +2 -9 umlrole.h
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/association.cpp #506102:506103
@@ -1,8 +1,3 @@
-/*
- * copyright (C) 2003-2004
- * Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>
- */
-
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
@@ -10,6 +5,8 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
+ * copyright (C) 2003-2006 *
+ * Umbrello UML Modeller Authors <uml-devel@ uml.sf.net> *
***************************************************************************/
#include <kdebug.h>
#include <klocale.h>
@@ -49,8 +46,6 @@
// destructor
UMLAssociation::~UMLAssociation( ) {
- // delete ourselves from the parent document
- UMLApp::app()->getDocument()->removeAssociation(this);
if (m_pRole[A] == NULL) {
kdError() << "UMLAssociation destructor: m_pRole[A] is NULL already"
<< endl;
@@ -214,7 +209,7 @@
obj[r] = doc->findObjectById(STR2ID(roleIdStr));
Uml::Role_Type role = (Uml::Role_Type)r;
if (obj[r] == NULL) {
- getUMLRole(role)->setIdStr(roleIdStr); // defer to resolveRef()
+ getUMLRole(role)->setSecondaryId(roleIdStr); // defer to resolveRef()
} else {
getUMLRole(role)->setObject(obj[r]);
}
@@ -250,9 +245,9 @@
// Since we know for sure that we're dealing with a non
// umbrello file, use deferred resolution unconditionally.
if (tagEq(tag, "child") || tagEq(tag, "subtype") || tagEq(tag, "client")) {
- getUMLRole(A)->setIdStr(idStr);
+ getUMLRole(A)->setSecondaryId(idStr);
} else {
- getUMLRole(B)->setIdStr(idStr);
+ getUMLRole(B)->setSecondaryId(idStr);
}
}
}
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umlrole.cpp #506102:506103
@@ -1,8 +1,3 @@
-/*
- * copyright (C) 2003-2004
- * Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>
- */
-
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
@@ -10,6 +5,8 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
+ * copyright (C) 2003-2006 *
+ * Umbrello UML Modeller Authors <uml-devel@ uml.sf.net> *
***************************************************************************/
#include <kdebug.h>
@@ -85,10 +82,6 @@
return m_role;
}
-void UMLRole::setIdStr( const QString &idStr ) {
- m_SecondaryId = idStr;
-}
-
void UMLRole::init(UMLAssociation * parent, UMLObject * parentObj, Uml::Role_Type r) {
m_BaseType = Uml::ot_Role;
m_role = r;
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umlrole.h #506102:506103
@@ -1,8 +1,3 @@
-/*
- * copyright (C) 2003-2004
- * Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>
- */
-
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
@@ -10,6 +5,8 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
+ * copyright (C) 2003-2006 *
+ * Umbrello UML Modeller Authors <uml-devel@ uml.sf.net> *
***************************************************************************/
#ifndef UMLROLE_H
@@ -89,10 +86,6 @@
UMLAssociation * getParentAssociation ();
- // Sets the m_SecondaryId
- // @todo Candidate for removal
- void setIdStr( const QString &idStr );
-
/** get the 'id' of the role (NOT the parent object). This could be
* either Uml::A or Uml::B. Yes, it would be better if we
* could get along without this, but we need it to distinguish saved
More information about the umbrello-devel
mailing list