summaryrefslogtreecommitdiff
path: root/src/categoriesdialog.cpp
diff options
context:
space:
mode:
authorJeremy Rimpo <jrim@rimpo.org>2023-09-24 05:46:09 -0500
committerJeremy Rimpo <jrim@rimpo.org>2023-09-24 05:54:27 -0500
commitc30b5183aeea55290ec9072cac958cd6e90fdf30 (patch)
treefa8dec2bf12e6f8979e7b938f861661e934665da /src/categoriesdialog.cpp
parent11522cf700e07a6c39bad45c346e62a73935c083 (diff)
Convert for loops, move nexusCats
Diffstat (limited to 'src/categoriesdialog.cpp')
-rw-r--r--src/categoriesdialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/categoriesdialog.cpp b/src/categoriesdialog.cpp
index b770fa0b..21523e85 100644
--- a/src/categoriesdialog.cpp
+++ b/src/categoriesdialog.cpp
@@ -234,7 +234,7 @@ void CategoriesDialog::fillTable()
table->setItem(row, 3, nexusCatItem.take());
}
- for (auto nexusCat : categories.m_NexusMap) {
+ for (const auto& nexusCat : categories.m_NexusMap) {
QScopedPointer<QListWidgetItem> nexusItem(new QListWidgetItem());
nexusItem->setData(Qt::DisplayRole, nexusCat.second.name());
nexusItem->setData(Qt::UserRole, nexusCat.second.ID());
@@ -355,7 +355,7 @@ void CategoriesDialog::nxmGameInfoAvailable(QString gameName, QVariant,
CategoryFactory& catFactory = CategoryFactory::instance();
QListWidget* list = ui->nexusCategoryList;
list->clear();
- for (auto category : categories) {
+ for (const auto& category : categories) {
auto catMap = category.toMap();
QScopedPointer<QListWidgetItem> nexusItem(new QListWidgetItem());
nexusItem->setData(Qt::DisplayRole, catMap["name"].toString());