[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Sun Aug 1 12:00:02 UTC 2004


CVS commit by okellogg: 

loadWidgetFromXMI(): Add a TODO remark.


  M +10 -0     umlview.cpp   1.166


--- kdesdk/umbrello/umbrello/umlview.cpp  #1.165:1.166
@@ -3188,4 +3188,14 @@ UMLWidget* UMLView::loadWidgetFromXMI(QD
         {
         // Find the UMLObject and create the Widget to represent it
+        /* TODO:
+           We peek ahead at the xmi.id and do a UMLDoc::findUMLObject()
+           to resolve the corresponding UMLObject for the widget.
+           That is a breach of encapsulation: Loading the xmi.id should
+           be the sole responsibility of UMLWidget::loadFromXMI().
+           I.e. the widget constructors that take an UMLObject arg
+           should be removed. Any computation in those constructors
+           that relies on the m_pObject being set should be relegated
+           to a separate method.
+         */
                 QString idstr  = widgetElement.attribute( "xmi.id", "-1" );
                 int id = idstr.toInt();






More information about the umbrello-devel mailing list