Reduce TabSupervisor direct usage in UserContextMenu

This commit is contained in:
Gavin Bisesi 2017-03-17 23:37:00 -04:00 committed by Gavin Bisesi
parent c5aa75d4d1
commit a3f4012d1a
5 changed files with 25 additions and 7 deletions

View file

@ -25,8 +25,7 @@ GameSelector::GameSelector(AbstractClient *_client, const TabSupervisor *_tabSup
gameListModel = new GamesModel(_rooms, _gameTypes, this);
if(showfilters)
{
bool ownUserIsRegistered = (bool)(tabSupervisor->getUserInfo()->user_level() & ServerInfo_User::IsRegistered);
gameListProxyModel = new GamesProxyModel(this, ownUserIsRegistered);
gameListProxyModel = new GamesProxyModel(this, tabSupervisor->isOwnUserRegistered());
gameListProxyModel->setSourceModel(gameListModel);
gameListProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
gameListView->setModel(gameListProxyModel);