[Uml-devel] [Bug 283744] Junk residual artifacts littering project file

Oliver Kellogg okellogg at users.sourceforge.net
Thu Feb 9 19:26:06 UTC 2012


https://bugs.kde.org/show_bug.cgi?id=283744





--- Comment #10 from Oliver Kellogg <okellogg users sourceforge net>  2012-02-09 19:26:05 ---
Created an attachment (id=68657)
 --> (http://bugs.kde.org/attachment.cgi?id=68657)
diff against trunk/KDE/kdesdk/umbrello/umbrello/widgets/widgetbase.cpp r1273456

Next wierdness: Approx. 315 warnings of the kind:
AssociationLine::setAssociation: Parent is null. Can not connect SIGNAL/SLOT

The call stack of these warnings is as follows:
  /trunk/KDE/kdesdk/umbrello/umbrello/widgets/associationwidget.cpp:3948
  /trunk/KDE/kdesdk/umbrello/umbrello/widgets/associationwidget.cpp:68
  /trunk/KDE/kdesdk/umbrello/umbrello/umlview.cpp:3545
  /trunk/KDE/kdesdk/umbrello/umbrello/umlview.cpp:3442
  /trunk/KDE/kdesdk/umbrello/umbrello/folder.cpp:381
  /trunk/KDE/kdesdk/umbrello/umbrello/folder.cpp:474
  /trunk/KDE/kdesdk/umbrello/umbrello/umlobject.cpp:1067
  /trunk/KDE/kdesdk/umbrello/umbrello/umldoc.cpp:2118
  /trunk/KDE/kdesdk/umbrello/umbrello/umldoc.cpp:2106
  /trunk/KDE/kdesdk/umbrello/umbrello/umldoc.cpp:1915
  /trunk/KDE/kdesdk/umbrello/umbrello/umldoc.cpp:542

AssociationLine::setAssociation() has this in line 626:

    UMLView * view =  (UMLView *)m_associationWidget->parent();

and the view comes back as NULL.
The parent() method originates in class QObject.
The member m_associationWidget is of type AssociationWidget, and this class
inherits from WidgetBase which in turn inherits from QObject.

In widgetbase.cpp r1268720, the constructor of WidgetBase looks like this:

WidgetBase::WidgetBase(UMLView *view) : QObject(view)
{ ... }

However, this was changed in r1268798:

WidgetBase::WidgetBase(UMLScene *scene)
  : m_scene(scene)
{ ... }

Therefore the parent is no longer set in QObject.

The attached patch restores the previous setting of the parent in QObject
and thus removes the warnings mentioned above.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.




More information about the umbrello-devel mailing list