@@ -93,7 +93,7 @@ void Categories::onCategoriesModelChanged(unity::glib::Object<DeeModel> model)
93 delete model;
93 delete model;
95 m_results.clear();
95 m_results.clear();
97 setModel(model);
97 setModel(model);
@@ -108,14 +108,14 @@ void Categories::onCategoryOrderChanged(std::vector<unsigned int> cat_order)
108 qWarning() << "No such category index:" << cat;
108 qWarning() << "No such category index:" << cat;
109 continue;
109 continue;
112 if (static_cast<int>(pos) != old_pos) {
112 if (static_cast<int>(pos) != old_pos) {
113 int target_pos = pos;
113 int target_pos = pos;
114 const bool status = beginMoveRows(QModelIndex(), old_pos, old_pos, QModelIndex(), target_pos);
114 const bool status = beginMoveRows(QModelIndex(), old_pos, old_pos, QModelIndex(), target_pos);
115 if (status)
115 if (status)
116 m_categoryOrder.move(old_pos, pos);
116 m_categoryOrder.move(old_pos, pos);
118− qWarning("beginMoveRows failed");
118+ qWarning("beginMoveRows failed");
119 endMoveRows();
119 endMoveRows();
@@ -245,7 +245,7 @@ Categories::data(const QModelIndex& index, int role) const
245 qWarning() << "Invalid index" << index.row();
245 qWarning() << "Invalid index" << index.row();
246 return QVariant();
246 return QVariant();
249 const QModelIndex realIndex = createIndex(realRow, index.column());
249 const QModelIndex realIndex = createIndex(realRow, index.column());
251 switch (role) {
251 switch (role) {
@@ -282,7 +282,7 @@ Categories::data(const QModelIndex& index, int role) const
282 return QVariant::fromValue(m_overriddenCategories[id]);
282 return QVariant::fromValue(m_overriddenCategories[id]);
284 return QVariant::fromValue(getResults(realRow));
284 return QVariant::fromValue(getResults(realRow));
285− case RoleCount:
285+ case RoleCount:
286 if (m_overriddenCategories.size() > 0)
286 if (m_overriddenCategories.size() > 0)
288 auto id = DeeListModel::data(realIndex, CategoryColumn::ID).toString();
288 auto id = DeeListModel::data(realIndex, CategoryColumn::ID).toString();