mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Rename 'unjoinable' games to 'unavailable'
This commit is contained in:
parent
edd429d874
commit
86ae8a47a8
4 changed files with 14 additions and 14 deletions
|
|
@ -107,14 +107,14 @@ void GamesModel::updateGameList(ServerInfo_Game *_game)
|
|||
}
|
||||
|
||||
GamesProxyModel::GamesProxyModel(QObject *parent, ServerInfo_User *_ownUser)
|
||||
: QSortFilterProxyModel(parent), ownUser(_ownUser), unjoinableGamesVisible(false)
|
||||
: QSortFilterProxyModel(parent), ownUser(_ownUser), unavailableGamesVisible(false)
|
||||
{
|
||||
setDynamicSortFilter(true);
|
||||
}
|
||||
|
||||
void GamesProxyModel::setUnjoinableGamesVisible(bool _unjoinableGamesVisible)
|
||||
void GamesProxyModel::setUnavailableGamesVisible(bool _unavailableGamesVisible)
|
||||
{
|
||||
unjoinableGamesVisible = _unjoinableGamesVisible;
|
||||
unavailableGamesVisible = _unavailableGamesVisible;
|
||||
invalidateFilter();
|
||||
}
|
||||
|
||||
|
|
@ -125,7 +125,7 @@ bool GamesProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &/*sourc
|
|||
return false;
|
||||
|
||||
ServerInfo_Game *game = model->getGame(sourceRow);
|
||||
if (!unjoinableGamesVisible) {
|
||||
if (!unavailableGamesVisible) {
|
||||
if (game->getPlayerCount() == game->getMaxPlayers())
|
||||
return false;
|
||||
if (game->getStarted())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue