[Uml-devel] kdesdk/umbrello/umbrello
Sebastian Stein
seb.kde at hpfsc.de
Tue Jul 13 05:23:06 UTC 2004
CVS commit by sstein:
patch by Achim Spangler:
The documentation of Qt states for QCanvasView::~QCanvasView ()
---------
Destroys the canvas view. The associated canvas is not deleted.
---------
==> thus we should delete the QCanvas of a UMLView instance during its destructor.
M +6 -0 umlview.cpp 1.155
--- kdesdk/umbrello/umbrello/umlview.cpp #1.154:1.155
@@ -173,4 +173,10 @@ void UMLView::init() {
////////////////////////////////////////////////////////////////////////////////////////////////////
UMLView::~UMLView() {
+ if ( canvas() != NULL ) {
+ // Qt Doc for QCanvasView::~QCanvasView () states:
+ // "Destroys the canvas view. The associated canvas is not deleted."
+ // we should do it now
+ delete canvas();
+ }
if(m_pIDChangesLog) {
delete m_pIDChangesLog;
More information about the umbrello-devel
mailing list