QTfrontend/chatwidget.cpp
changeset 5772 c09c50efe8b5
parent 5735 08ac2d557392
child 5953 57af6f3abf4a
--- a/QTfrontend/chatwidget.cpp	Sun Sep 04 13:36:59 2011 -0400
+++ b/QTfrontend/chatwidget.cpp	Sun Sep 04 21:39:50 2011 +0400
@@ -400,9 +400,8 @@
 
 void HWChatWidget::nickRemoved(const QString& nick)
 {
-    QList<QListWidgetItem *> items = chatNicks->findItems(nick, Qt::MatchExactly);
-    QListIterator<QListWidgetItem *> it(items);
-    while(it.hasNext()) chatNicks->takeItem(chatNicks->row(it.next()));
+    foreach(QListWidgetItem * item, chatNicks->findItems(nick, Qt::MatchExactly))
+        chatNicks->takeItem(chatNicks->row(item));
 
     emit nickCountUpdate(chatNicks->count());
 }