[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Fri Apr 13 20:10:37 UTC 2007
SVN commit 653617 by okellogg:
emitModified() does the check against umldoc->loading()
M +9 -3 classifier.cpp
M +7 -21 umlobject.cpp
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/classifier.cpp #653616:653617
@@ -649,10 +649,16 @@
ops.append(static_cast<UMLOperation*>(li));
}
if (includeInherited) {
- UMLClassifierList parents(findSuperClassConcepts());
- for (UMLClassifierListIt pit(parents); pit.current(); ++pit) {
+ UMLClassifierList parents = findSuperClassConcepts();
+ UMLClassifier *c;
+ for (UMLClassifierListIt pit(parents); (c = pit.current()) != NULL; ++pit) {
+ if (c == this) {
+ kError() << "UMLClassifier::getOpList: class " << c->getName()
+ << " is parent of itself ?!?" << endl;
+ continue;
+ }
// get operations for each parent by recursive call
- UMLOperationList pops = pit.current()->getOpList(true);
+ UMLOperationList pops = c->getOpList(true);
// add these operations to operation list, but only if unique.
for (UMLOperation *po = pops.first(); po; po = pops.next()) {
QString po_as_string(po->toString(Uml::st_SigNoVis));
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umlobject.cpp #653616:653617
@@ -94,16 +94,12 @@
void UMLObject::setID(Uml::IDType NewID) {
m_nId = NewID;
- UMLDoc *umldoc = UMLApp::app()->getDocument();
- if (! umldoc->loading())
- emit modified();
+ emitModified();
}
void UMLObject::setName(const QString &strName) {
m_Name = strName;
- UMLDoc *umldoc = UMLApp::app()->getDocument();
- if (! umldoc->loading())
- emit modified();
+ emitModified();
}
QString UMLObject::getName() const {
@@ -215,9 +211,7 @@
void UMLObject::setAbstract(bool bAbstract) {
m_bAbstract = bAbstract;
- UMLDoc *umldoc = UMLApp::app()->getDocument();
- if (! umldoc->loading())
- emit modified();
+ emitModified();
}
void UMLObject::setInPaste(bool bInPaste /* =true */) {
@@ -233,9 +227,7 @@
void UMLObject::setStatic(bool bStatic)
{
m_bStatic = bStatic;
- UMLDoc *umldoc = UMLApp::app()->getDocument();
- if (! umldoc->loading())
- emit modified();
+ emitModified();
}
void UMLObject::emitModified()
@@ -272,9 +264,7 @@
void UMLObject::setVisibility(Uml::Visibility s) {
m_Vis = s;
- UMLDoc *umldoc = UMLApp::app()->getDocument();
- if (! umldoc->loading())
- emit modified();
+ emitModified();
}
void UMLObject::setUMLStereotype(UMLStereotype *stereo) {
@@ -293,9 +283,7 @@
}
m_pStereotype = stereo;
// TODO: don't emit modified() if predefined folder
- UMLDoc *umldoc = UMLApp::app()->getDocument();
- if (! umldoc->loading())
- emit modified();
+ emitModified();
}
void UMLObject::setStereotype(const QString &_name) {
@@ -333,9 +321,7 @@
void UMLObject::setUMLPackage(UMLPackage* pPkg) {
m_pUMLPackage = pPkg;
- UMLDoc *umldoc = UMLApp::app()->getDocument();
- if (! umldoc->loading())
- emit modified();
+ emitModified();
}
const UMLStereotype * UMLObject::getUMLStereotype() {
More information about the umbrello-devel
mailing list