fixed codeql

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2023-10-22 00:06:08 +03:00
parent d151e97e3a
commit 10ae808da9
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318

View File

@ -289,10 +289,10 @@ void ModFilterWidget::setCategories(QList<ModPlatform::Category> categories)
} }
} }
void ModFilterWidget::onCategoryClicked(QListWidgetItem* item) void ModFilterWidget::onCategoryClicked(QListWidgetItem* itm)
{ {
if (item) if (itm)
item->setCheckState(item->checkState() == Qt::Checked ? Qt::Unchecked : Qt::Checked); itm->setCheckState(itm->checkState() == Qt::Checked ? Qt::Unchecked : Qt::Checked);
m_filter->categoryIds.clear(); m_filter->categoryIds.clear();
for (auto i = 0; i < ui->categoriesList->count(); i++) { for (auto i = 0; i < ui->categoriesList->count(); i++) {
auto item = ui->categoriesList->item(i); auto item = ui->categoriesList->item(i);