[Uml-devel] [PATCH] Neverending loop while adding a new attribute -> fixed

Sebastian Stein s5228 at informatik.htw-dresden.de
Mon Jul 22 15:26:02 UTC 2002


And again a bug fixed, but I think this time in code that is relative new
and so maybe under development.

In umldoc.cpp is a never ending loop and because of this loop it was
impossible to add an operation or attribute to a class. The attached file
fixes this problem.

Steinchen
-- 
http://www.hpfsc.de/ - die Seite rund um:
Assembler, Bundeswehr, TFT LCDs, Halle/Saale, Fahrradtouren,
Wanderstaat Mauma, Raumschiff USS Nathan, Enemy Room, MLCAD Tutorial
-------------- next part --------------
diff -u alt/umldoc.cpp neu/umldoc.cpp
--- alt/umldoc.cpp	Tue Jul 23 00:19:06 2002
+++ neu/umldoc.cpp	Tue Jul 23 00:16:19 2002
@@ -524,7 +524,8 @@
      name = currentName;
      if(number > 0)
         name.append("_").append(QString::number(number));
-     loop = ( ((UMLConcept*)o) -> findChildObject(type, name) ).count() == 0;
+     if ( ( ((UMLConcept*)o) -> findChildObject(type, name) ).count() == 0 )
+       break;
      number++;
    }
    if(number > 1)


More information about the umbrello-devel mailing list