# HG changeset patch # User unc0rr # Date 1349975876 -14400 # Node ID 75e1d0c0ba7252975a580b9a74573feeac7d11ac # Parent dc41e9222d2c70508e856d3c08205285b5b0bdc2 - Nicks starting from not-letter char go to bottom of the list - Small fixes diff -r dc41e9222d2c -r 75e1d0c0ba72 QTfrontend/model/playerslistmodel.cpp --- a/QTfrontend/model/playerslistmodel.cpp Wed Oct 10 23:58:23 2012 +0400 +++ b/QTfrontend/model/playerslistmodel.cpp Thu Oct 11 21:17:56 2012 +0400 @@ -91,7 +91,6 @@ QModelIndex mi = index(rowCount() - 1); setData(mi, nickname); - updateSortData(mi); checkFriendIgnore(mi); } @@ -268,11 +267,17 @@ void PlayersListModel::updateSortData(const QModelIndex & index) { - QString result = QString("%1%2%3%4%5") + QString result = QString("%1%2%3%4%5%6") + // room admins go first, then server admins, then friends .arg(1 - index.data(RoomAdmin).toInt()) .arg(1 - index.data(ServerAdmin).toInt()) .arg(1 - index.data(Friend).toInt()) + // ignored at bottom .arg(index.data(Ignore).toInt()) + // keep nicknames starting from non-letter character at bottom within group + // assume there are no empty nicks in list + .arg(index.data(Qt::DisplayRole).toString().at(0).isLetter() ? 0 : 1) + // sort ignoring case .arg(index.data(Qt::DisplayRole).toString().toLower()) ; @@ -298,6 +303,7 @@ setData(mi, m_ignoredSet.contains(mi.data().toString().toLower()), Ignore); updateIcon(mi); + updateSortData(mi); } void PlayersListModel::loadSet(QSet & set, const QString & suffix) diff -r dc41e9222d2c -r 75e1d0c0ba72 QTfrontend/net/newnetclient.cpp --- a/QTfrontend/net/newnetclient.cpp Wed Oct 10 23:58:23 2012 +0400 +++ b/QTfrontend/net/newnetclient.cpp Thu Oct 11 21:17:56 2012 +0400 @@ -465,7 +465,7 @@ if (lst[i] == mynick) { netClientState = InLobby; - m_playersModel->resetRoomFlags(); + RawSendNet(QString("LIST")); emit connected(); }