--- a/QTfrontend/model/playerslistmodel.cpp Sat Oct 27 00:27:15 2012 +0400
+++ b/QTfrontend/model/playerslistmodel.cpp Sat Oct 27 00:39:27 2012 +0400
@@ -110,8 +110,9 @@
if(mil.size())
{
- setData(mil[0], "1", RoomFilterRole);
+ setData(mil[0], true, RoomFilterRole);
updateIcon(mil[0]);
+ updateSortData(mil[0]);
}
}
@@ -122,7 +123,10 @@
if(mil.size())
{
- setData(mil[0], "0", RoomFilterRole);
+ setData(mil[0], false, RoomFilterRole);
+ setData(mil[0], false, RoomAdmin);
+ setData(mil[0], false, Ready);
+ setData(mil[0], false, InGame);
updateIcon(mil[0]);
}
}
@@ -181,9 +185,9 @@
{
QModelIndex mi = index(i);
- if(mi.data(RoomFilterRole).toString() == "1")
+ if(mi.data(RoomFilterRole).toBool())
{
- setData(mi, "0", RoomFilterRole);
+ setData(mi, false, RoomFilterRole);
setData(mi, false, RoomAdmin);
setData(mi, false, Ready);
setData(mi, false, InGame);
@@ -207,7 +211,7 @@
<< index.data(Friend).toBool()
<< index.data(Ignore).toBool()
<< index.data(InGame).toBool()
- << (index.data(RoomFilterRole).toString() == "1")
+ << index.data(RoomFilterRole).toBool()
;
for(int i = flags.size() - 1; i >= 0; --i)
@@ -225,7 +229,7 @@
QPainter painter(&result);
- if(index.data(RoomFilterRole).toString() == "1")
+ if(index.data(RoomFilterRole).toBool())
if(index.data(InGame).toBool())
painter.drawPixmap(0, 0, 16, 16, QPixmap(":/res/chat/ingame.png"));
else