Summary: | crash when click in an empty zone of the list view when the context menu is displayed | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | Gaël de Chalendar (aka Kleag) <kleagg> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | greatbunzinni |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Patch that solves the crash |
Description
Gaël de Chalendar (aka Kleag)
2006-06-16 15:02:34 UTC
Created attachment 16639 [details]
Patch that solves the crash
No sure if is the good solution to consider a null item (click on nothing) as a
lvt_Unknown
*** Bug 126560 has been marked as a duplicate of this bug. *** SVN commit 552136 by okellogg: Make proper Uml::ListView_Type lvt_EnumLiteral. BUG:129252 M +1 -0 ChangeLog M +4 -0 umbrello/listpopupmenu.cpp M +11 -7 umbrello/umllistview.cpp M +1 -0 umbrello/umlnamespace.h --- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #552135:552136 @@ -2,6 +2,7 @@ * Bugs/wishes from http://bugs.kde.org: * Fix crash when importing classes from a java file (129107) +* Crash after single click on the "UML Model" tree window (126560/129252) Version 1.5.3 --- branches/KDE/3.5/kdesdk/umbrello/umbrello/listpopupmenu.cpp #552135:552136 @@ -165,6 +165,10 @@ mt = mt_Enum; break; + case Uml::lvt_EnumLiteral: + mt = mt_EnumLiteral; + break; + case Uml::lvt_Datatype: mt = mt_Datatype; break; --- branches/KDE/3.5/kdesdk/umbrello/umbrello/umllistview.cpp #552135:552136 @@ -192,7 +192,7 @@ case Uml::lvt_EntityAttribute: case Uml::lvt_Operation: case Uml::lvt_Template: - case Uml::lvt_Unknown: // used for EnumLiteral + case Uml::lvt_EnumLiteral: UMLApp::app() -> getDocWindow() -> showDocumentation( item -> getUMLObject(), false ); break; @@ -1565,7 +1565,7 @@ case Uml::lvt_EntityAttribute: case Uml::lvt_Operation: case Uml::lvt_Template: - case Uml::lvt_Unknown: // used for EnumLiteral + case Uml::lvt_EnumLiteral: { UMLClassifier *pClass = static_cast<UMLClassifier*>(parent->getUMLObject()); Uml::IDType newID = IDChanges.findNewID( Data.getID() ); @@ -1741,6 +1741,10 @@ type = Uml::lvt_Enum; break; + case Uml::ot_EnumLiteral: + type = Uml::lvt_EnumLiteral; + break; + case Uml::ot_Entity: type = Uml::lvt_Entity; break; @@ -1830,7 +1834,7 @@ ot = Uml::ot_Template; break; - case Uml::lvt_Unknown: // @todo make a proper lvt_EnumLiteral + case Uml::lvt_EnumLiteral: ot = Uml::ot_EnumLiteral; break; @@ -2376,7 +2380,7 @@ case Uml::lvt_EntityAttribute: case Uml::lvt_Operation: case Uml::lvt_Template: - case Uml::lvt_Unknown: // used for EnumLiteral + case Uml::lvt_EnumLiteral: return createChildUMLObject( renamedItem, convert_LVT_OT(type) ); break; @@ -2681,7 +2685,7 @@ case Uml::lvt_Attribute: case Uml::lvt_EntityAttribute: case Uml::lvt_Operation: - case Uml::lvt_Unknown: // used for EnumLiteral + case Uml::lvt_EnumLiteral: { UMLClassifier *parent = static_cast<UMLClassifier*>(parentItem->getUMLObject()); return (parent->findChildObject(name) == NULL); @@ -2851,7 +2855,7 @@ case Uml::lvt_EntityAttribute: case Uml::lvt_Template: case Uml::lvt_Operation: - case Uml::lvt_Unknown: // used for EnumLiteral + case Uml::lvt_EnumLiteral: item = findItem(nID); if (item == NULL) { kdDebug() << "UMLListView::loadChildrenFromXMI: " @@ -3032,7 +3036,7 @@ type == Uml::lvt_Operation || type == Uml::lvt_Template || type == Uml::lvt_EntityAttribute || - type == Uml::lvt_Unknown) { // used for enum literal + type == Uml::lvt_EnumLiteral) { return true; } else { return false; --- branches/KDE/3.5/kdesdk/umbrello/umbrello/umlnamespace.h #552135:552136 @@ -204,6 +204,7 @@ lvt_EntityRelationship_Model, lvt_Subsystem, lvt_Model, + lvt_EnumLiteral, lvt_Unknown = -1 }; |