Pass QTime objects instead of references (#5209)

- References seem to go to 0 in newer Qt versions(?)

https://doc.qt.io/qt-6/qtime.html

> QTime objects should be passed by value rather than by reference to const; they simply package int.
This commit is contained in:
Zach H 2024-11-29 22:36:38 -08:00 committed by GitHub
parent d2bc7f6ac0
commit e33ff37c82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -276,7 +276,7 @@ int DlgFilterGames::getMaxPlayersFilterMax() const
return maxPlayersFilterMaxSpinBox->value();
}
const QTime &DlgFilterGames::getMaxGameAge() const
QTime DlgFilterGames::getMaxGameAge() const
{
int index = maxGameAgeComboBox->currentIndex();
if (index < 0 || index >= gameAgeMap.size()) { // index is out of bounds

View file

@ -67,7 +67,7 @@ public:
int getMaxPlayersFilterMin() const;
int getMaxPlayersFilterMax() const;
void setMaxPlayersFilter(int _maxPlayersFilterMin, int _maxPlayersFilterMax);
const QTime &getMaxGameAge() const;
QTime getMaxGameAge() const;
const QMap<QTime, QString> gameAgeMap;
bool getShowOnlyIfSpectatorsCanWatch() const;
bool getShowSpectatorPasswordProtected() const;