[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bkdepim/4=2E6=5D_knode=3A_Fix_crash_when_removing_a_?=
From:       Olivier Trichet <nive () nivalis ! org>
Date:       2011-06-11 22:23:10
Message-ID: 20110611222310.AC213A60A4 () git ! kde ! org
[Download RAW message or body]

Git commit 987ecf935b8b63b233c1523109ff6e5f6346768f by Olivier Trichet.
Committed on 11/06/2011 at 17:49.
Pushed by otrichet into branch '4.6'.

Fix crash when removing a folder

Apply the same workaround used for the crash at group unsubscription
(4cb6e7c84920e7bec3813a431fd086eeed447f05)

(cherry picked from commit 5d85ba210adf2c77b9df17b69f53c8b6a439d4e8)

M  +3    -0    knode/kncollectionview.cpp     

http://commits.kde.org/kdepim/987ecf935b8b63b233c1523109ff6e5f6346768f

diff --git a/knode/kncollectionview.cpp b/knode/kncollectionview.cpp
index 9bf1676..3077403 100644
--- a/knode/kncollectionview.cpp
+++ b/knode/kncollectionview.cpp
@@ -132,6 +132,7 @@ void KNCollectionView::removeAccount( KNNntpAccount::Ptr a )
   while ( ( child = static_cast<KNCollectionViewItem*>( aitem->takeChild( 0 ) ) ) ) {
     removeGroup( boost::static_pointer_cast<KNGroup>( child->collection() ) );
   }
+
   delete aitem;
   a->setListItem(0);
 }
@@ -221,6 +222,8 @@ void KNCollectionView::removeFolder( KNFolder::Ptr f)
   while ( ( child = static_cast<KNCollectionViewItem*>( it->takeChild( 0 ) ) ) ) {
     removeFolder( boost::static_pointer_cast<KNFolder>( child->collection() ) );
   }
+
+  f->listItem()->setHidden( true ); // work around bug 248256
   delete f->listItem();
   f->setListItem(0);
 }

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic