summaryrefslogtreecommitdiff
path: root/src/modinfodialog.cpp
diff options
context:
space:
mode:
authorTannin <sherb@gmx.net>2016-05-07 00:03:38 +0200
committerTannin <sherb@gmx.net>2016-05-07 00:03:38 +0200
commiteb97c46ed68a965d6ddf44fa6741fa929fd7d278 (patch)
treef2c92e8a688faacdbd6285ac5b5bf5f91a5ee3e9 /src/modinfodialog.cpp
parentd958e11e2b3cde75f481bdb734be10b4e1dda585 (diff)
cleanup
Diffstat (limited to 'src/modinfodialog.cpp')
-rw-r--r--src/modinfodialog.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/modinfodialog.cpp b/src/modinfodialog.cpp
index feaac2d4..e1a2183c 100644
--- a/src/modinfodialog.cpp
+++ b/src/modinfodialog.cpp
@@ -351,14 +351,18 @@ void ModInfoDialog::refreshLists()
void ModInfoDialog::addCategories(const CategoryFactory &factory, const std::set<int> &enabledCategories, QTreeWidgetItem *root, int rootLevel)
{
- for (size_t i = 0; i < factory.numCategories(); ++i) {
+ for (int i = 0; i < static_cast<int>(factory.numCategories()); ++i) {
if (factory.getParentID(i) != rootLevel) {
continue;
}
int categoryID = factory.getCategoryID(i);
- QTreeWidgetItem *newItem = new QTreeWidgetItem(QStringList(factory.getCategoryName(i)));
+ QTreeWidgetItem *newItem
+ = new QTreeWidgetItem(QStringList(factory.getCategoryName(i)));
newItem->setFlags(newItem->flags() | Qt::ItemIsUserCheckable);
- newItem->setCheckState(0, enabledCategories.find(categoryID) != enabledCategories.end() ? Qt::Checked : Qt::Unchecked);
+ newItem->setCheckState(0, enabledCategories.find(categoryID)
+ != enabledCategories.end()
+ ? Qt::Checked
+ : Qt::Unchecked);
newItem->setData(0, Qt::UserRole, categoryID);
if (factory.hasChildren(i)) {
addCategories(factory, enabledCategories, newItem, categoryID);