Mercurial > minori
diff src/gui/dialog/settings/recognition.cc @ 149:e41505d24733
players: filter out web browsers, they aren't even supported in animia yet
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Tue, 14 Nov 2023 13:40:11 -0500 |
parents | 6fdf0632c003 |
children | ffa535b6d630 |
line wrap: on
line diff
--- a/src/gui/dialog/settings/recognition.cc Tue Nov 14 13:27:13 2023 -0500 +++ b/src/gui/dialog/settings/recognition.cc Tue Nov 14 13:40:11 2023 -0500 @@ -37,11 +37,11 @@ { QListWidget* listwidget = new QListWidget(widget); for (size_t i = 0; i < players.size(); i++) { - const auto& player = players[i]; - { + const auto& [enabled, player] = players[i]; + if (player.type == animia::PlayerType::Default) { QListWidgetItem* item = new QListWidgetItem(listwidget); - item->setCheckState(player.first ? Qt::Checked : Qt::Unchecked); - item->setText(Strings::ToQString(player.second.name)); + item->setCheckState(enabled ? Qt::Checked : Qt::Unchecked); + item->setText(Strings::ToQString(player.name)); item->setData(Qt::UserRole, QVariant::fromValue(i)); } }