Change filter hint text to "Games shown: X / Y" and fix user-game segfault (#3973)

This commit is contained in:
Kaitlin 2020-05-08 15:15:54 -04:00 committed by GitHub
parent 9246c190fa
commit 1988e4558f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 51 additions and 61 deletions

View file

@ -77,9 +77,6 @@ private:
int maxPlayersFilterMin, maxPlayersFilterMax;
static const int DEFAULT_MAX_PLAYERS_MAX = 99;
static const bool DEFAULT_UNAVAILABLE_GAMES_VISIBLE = false;
static const bool DEFAULT_SHOW_PASSWORD_PROTECTED_GAMES = true;
static const bool DEFAULT_SHOW_BUDDIES_ONLY_GAMES = true;
public:
GamesProxyModel(QObject *parent = nullptr, const TabSupervisor *_tabSupervisor = nullptr);
@ -128,14 +125,15 @@ public:
return maxPlayersFilterMax;
}
void setMaxPlayersFilter(int _maxPlayersFilterMin, int _maxPlayersFilterMax);
int getNumFilteredGames() const;
void resetFilterParameters();
void loadFilterParameters(const QMap<int, QString> &allGameTypes);
void saveFilterParameters(const QMap<int, QString> &allGameTypes);
int getNumberOfAlteredFilters() const;
void refresh();
protected:
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
bool filterAcceptsRow(int sourceRow) const;
};
#endif