From 15720bf922c6dc9e4d72c124f30353e3a9f74dac Mon Sep 17 00:00:00 2001 From: stv Date: Wed, 21 Dec 2005 09:25:04 +0000 Subject: [PATCH] removeObject(). Recursive invocation replaced by iterative references removing. --- src/ObjBrowser/OB_Browser.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ObjBrowser/OB_Browser.cxx b/src/ObjBrowser/OB_Browser.cxx index 272a4b661..81ee7a6bf 100755 --- a/src/ObjBrowser/OB_Browser.cxx +++ b/src/ObjBrowser/OB_Browser.cxx @@ -1058,9 +1058,12 @@ void OB_Browser::removeObject( SUIT_DataObject* obj, const bool autoUpd ) // Otherwise, "delete item" line will destroy all item's children, // and will contain invalid pointers (see ~QListViewItem() description in Qt docs) DataObjectList childList; - obj->children( childList ); + obj->children( childList, true ); for ( DataObjectListIterator it( childList ); it.current(); ++it ) - removeObject( it.current(), false ); + { + it.current()->disconnect( this, SLOT( onDestroyed( SUIT_DataObject* ) ) ); + myItems.remove( it.current() ); + } QListViewItem* item = listViewItem( obj ); -- 2.39.2