Chat works!

This commit is contained in:
Max-Wilhelm Bruker 2009-11-13 18:27:06 +01:00
parent 1baa188067
commit 64aa68cd26
28 changed files with 714 additions and 424 deletions

View file

@ -1,9 +1,12 @@
#include "gamesmodel.h"
#include "protocol_datastructures.h"
GamesModel::~GamesModel()
{
cleanList();
if (!gameList.isEmpty()) {
beginRemoveRows(QModelIndex(), 0, gameList.size() - 1);
gameList.clear();
endRemoveRows();
}
}
QVariant GamesModel::data(const QModelIndex &index, int role) const
@ -69,16 +72,6 @@ void GamesModel::updateGameList(const ServerGameInfo &game)
endInsertRows();
}
void GamesModel::cleanList()
{
if (gameList.isEmpty())
return;
beginRemoveRows(QModelIndex(), 0, gameList.size() - 1);
gameList.clear();
endRemoveRows();
}
GamesProxyModel::GamesProxyModel(QObject *parent)
: QSortFilterProxyModel(parent), fullGamesVisible(false)
{