@@ -94,7 +94,7 @@ void Categories::onCategoriesModelChanged(unity::glib::Object<DeeModel> model)
94 setModel(model);
94 setModel(model);
97−void Categories::onCategoryOrderChanged(std::vector<unsigned int> cat_order)
97+void Categories::onCategoryOrderChanged(const std::vector<unsigned int>& cat_order)
99 for (unsigned int pos = 0; pos<cat_order.size(); pos++)
99 for (unsigned int pos = 0; pos<cat_order.size(); pos++)
@@ -152,7 +152,6 @@ void Categories::onRowCountChanged()
152 for (int i = 0; i < rowCount(); i++) {
152 for (int i = 0; i < rowCount(); i++) {
153 auto id = data(index(i), RoleCategoryId).toString();
153 auto id = data(index(i), RoleCategoryId).toString();
154 if (id != iter.key()) continue;
154 if (id != iter.key()) continue;
155− const int mappedIndex = m_categoryOrder.indexOf(i);
156 QVector<int> roles;
155 QVector<int> roles;
157 roles.append(RoleCount);
156 roles.append(RoleCount);
158 QModelIndex changedIndex = index(i);
157 QModelIndex changedIndex = index(i);