on xenial help sign in
Act on review commetns.
ae54754Pawel Stolowski
plugins/Unity/categories.cpp+1−2
@@ -94,7 +94,7 @@ void Categories::onCategoriesModelChanged(unity::glib::Object<DeeModel> model)
94 setModel(model);
94 setModel(model);
95}
95}
96
96
97−void Categories::onCategoryOrderChanged(std::vector<unsigned int> cat_order)
97+void Categories::onCategoryOrderChanged(const std::vector<unsigned int>& cat_order)
98{
98{
99 for (unsigned int pos = 0; pos<cat_order.size(); pos++)
99 for (unsigned int pos = 0; pos<cat_order.size(); pos++)
100 {
100 {
@@ -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);
plugins/Unity/categories.h+1−1
@@ -74,7 +74,7 @@ private Q_SLOTS:
74
74
75private:
75private:
76 void onCategoriesModelChanged(unity::glib::Object<DeeModel> model);
76 void onCategoriesModelChanged(unity::glib::Object<DeeModel> model);
77− void onCategoryOrderChanged(std::vector<unsigned int> cat_order);
77+ void onCategoryOrderChanged(const std::vector<unsigned int>& cat_order);
78
78
79 DeeListModel* getResults(int index) const;
79 DeeListModel* getResults(int index) const;
80
80