sortable game-list in lobby
This commit is contained in:
@@ -66,6 +66,9 @@
|
|||||||
<property name="horizontalScrollBarPolicy" >
|
<property name="horizontalScrollBarPolicy" >
|
||||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sortingEnabled" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<column>
|
<column>
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Game</string>
|
<string>Game</string>
|
||||||
|
|||||||
@@ -240,8 +240,13 @@ void gameLobbyDialogImpl::updateGameItem(QTreeWidgetItem *item, unsigned gameId)
|
|||||||
else
|
else
|
||||||
item->setData(2, Qt::DisplayRole, tr("open"));
|
item->setData(2, Qt::DisplayRole, tr("open"));
|
||||||
|
|
||||||
if (info.isPasswordProtected)
|
if (info.isPasswordProtected) {
|
||||||
item->setIcon(3, QIcon(myAppDataPath+"gfx/gui/misc/lock.png"));
|
item->setIcon(3, QIcon(myAppDataPath+"gfx/gui/misc/lock.png"));
|
||||||
|
item->setData(3, Qt::UserRole, 1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
item->setData(3, Qt::UserRole, 0);
|
||||||
|
}
|
||||||
|
|
||||||
refreshGameStats();
|
refreshGameStats();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user