equal
deleted
inserted
replaced
61 chatEditLine->clear(); |
61 chatEditLine->clear(); |
62 } |
62 } |
63 |
63 |
64 void HWChatWidget::onChatString(const QString& str) |
64 void HWChatWidget::onChatString(const QString& str) |
65 { |
65 { |
66 QListWidget* w = chatText; |
66 QListWidget* w = chatText; |
67 w->addItem(str); |
67 |
68 w->scrollToBottom(); |
68 if (w->count() > 250) |
69 w->setSelectionMode(QAbstractItemView::NoSelection); |
69 delete w->item(0); |
|
70 |
|
71 w->addItem(str); |
|
72 w->scrollToBottom(); |
|
73 w->setSelectionMode(QAbstractItemView::NoSelection); |
70 } |
74 } |
71 |
75 |
72 void HWChatWidget::nickAdded(const QString& nick) |
76 void HWChatWidget::nickAdded(const QString& nick) |
73 { |
77 { |
74 QListWidgetItem * item = new QListWidgetItem(nick); |
78 QListWidgetItem * item = new QListWidgetItem(nick); |