commit e10ebb8bd33cf807e2edfa56c465b40f3237102e Author: Ruben Vandamme Date: Sun Jul 8 10:56:37 2012 +0200 Fix crash in ContactListModel. * Individually delete every child instead of using qDeleteAll. * Crash only happens in combination with Qt 4.8. * See https://bugs.kde.org/show_bug.cgi?id=285951 for similar issue in Amarok. * See https://bugreports.qt-project.org/browse/QTBUG-22037 for Qt report. * Many thanks to Bob ("badjar" on kmess.org/board) for providing the fix. diff --git a/src/model/contactlistmodelitem.cpp b/src/model/contactlistmodelitem.cpp index 462d555..ac5a6ca 100644 --- a/src/model/contactlistmodelitem.cpp +++ b/src/model/contactlistmodelitem.cpp @@ -79,7 +79,11 @@ ContactListModelItem::ContactListModelItem( Group *group, ContactListModelItem * */ ContactListModelItem::~ContactListModelItem() { - qDeleteAll( childItems_ ); + while( !childItems_.isEmpty() ) + { + delete childItems_.takeFirst(); + } + childItems_.clear(); // Delete this item from the parent's children