mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 16:24:45 -07:00
Reduce data dependency for GamesProxyModel
This commit is contained in:
parent
d65a444ac5
commit
c5aa75d4d1
3 changed files with 7 additions and 6 deletions
|
|
@ -25,7 +25,8 @@ GameSelector::GameSelector(AbstractClient *_client, const TabSupervisor *_tabSup
|
|||
gameListModel = new GamesModel(_rooms, _gameTypes, this);
|
||||
if(showfilters)
|
||||
{
|
||||
gameListProxyModel = new GamesProxyModel(this, tabSupervisor->getUserInfo());
|
||||
bool ownUserIsRegistered = (bool)(tabSupervisor->getUserInfo()->user_level() & ServerInfo_User::IsRegistered);
|
||||
gameListProxyModel = new GamesProxyModel(this, ownUserIsRegistered);
|
||||
gameListProxyModel->setSourceModel(gameListModel);
|
||||
gameListProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
|
||||
gameListView->setModel(gameListProxyModel);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue