--- a/QTfrontend/chatwidget.cpp Fri Jun 17 18:03:12 2011 +0200
+++ b/QTfrontend/chatwidget.cpp Mon Jun 20 20:43:11 2011 +0200
@@ -21,7 +21,6 @@
#include <QTextBrowser>
#include <QLineEdit>
#include <QAction>
-#include <QApplication>
#include <QTextDocument>
#include <QDir>
#include <QSettings>
@@ -31,7 +30,6 @@
#include <QCursor>
#include <QScrollBar>
#include <QItemSelectionModel>
-#include <QLabel>
#include "hwconsts.h"
#include "SDLs.h"
@@ -165,12 +163,7 @@
connect(chatNicks, SIGNAL(currentRowChanged(int)),
this, SLOT(chatNickSelected(int)));
- mainLayout.addWidget(chatNicks, 1, 1, 2, 1);
-
- lblCount = new QLabel(this);
- mainLayout.addWidget(lblCount, 0, 1);
- lblCount->setText("0");
- lblCount->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
+ mainLayout.addWidget(chatNicks, 0, 1, 3, 1);
acInfo = new QAction(QAction::tr("Info"), chatNicks);
acInfo->setIcon(QIcon(":/res/info.png"));
@@ -398,7 +391,7 @@
updateNickItem(item);
chatNicks->addItem(item);
- lblCount->setText(QString::number(chatNicks->count()));
+ emit nickCountUpdate(chatNicks->count());
if(notifyNick && notify && gameSettings->value("frontend/sound", true).toBool()) {
Mix_PlayChannel(-1, sound[rand()%4], 0);
@@ -411,7 +404,7 @@
QListIterator<QListWidgetItem *> it(items);
while(it.hasNext()) chatNicks->takeItem(chatNicks->row(it.next()));
- lblCount->setText(QString::number(chatNicks->count()));
+ emit nickCountUpdate(chatNicks->count());
}
void HWChatWidget::clear()