QTfrontend/chatwidget.cpp
changeset 5140 932307228d05
parent 5094 9c3553254100
child 5238 46ddaf14509d
--- a/QTfrontend/chatwidget.cpp	Mon Apr 11 01:30:43 2011 +0200
+++ b/QTfrontend/chatwidget.cpp	Mon Apr 11 11:22:10 2011 -0400
@@ -409,10 +409,8 @@
 void HWChatWidget::nickRemoved(const QString& nick)
 {
     QList<QListWidgetItem *> items = chatNicks->findItems(nick, Qt::MatchExactly);
-    for(QList<QListWidgetItem *>::iterator it=items.begin(); it!=items.end();) {
-        chatNicks->takeItem(chatNicks->row(*it));
-        ++it;
-    }
+    QListIterator<QListWidgetItem *> it(items);
+    while(it.hasNext()) chatNicks->takeItem(chatNicks->row(it.next()));
 
     lblCount->setText(QString::number(chatNicks->count()));
 }