on xenial help sign in
Remove unneeded role.

Approved by PS Jenkins bot, Pawel Stolowski.

commitcc4e57219cd6715c43c534ee68c222cefdbf019b authorAlbert Astals <albert.astals@canonical.com> dateWed 4 Sep 2013, 02:12 (13 years ago) parentaee304f6160492
4 files changed+2−10
plugins/Unity/categories.cpp−3 plugins/Unity/categories.h+1−2 tests/mocks/Unity/fake_categories.cpp−3 tests/mocks/Unity/fake_categories.h+1−2
plugins/Unity/categories.cpp−3
@@ -43,7 +43,6 @@ Categories::Categories(QObject* parent)
4343 m_roles[Categories::RoleHints] = "hints";
4444 m_roles[Categories::RoleResults] = "results";
4545 m_roles[Categories::RoleCount] = "count";
46− m_roles[Categories::RoleCategoryIndex] = "categoryIndex";
4746
4847 // TODO This should not be needed but accumulatting the count changes
4948 // makes the visualization more stable and also makes crashes on fast
@@ -222,8 +221,6 @@ Categories::data(const QModelIndex& index, int role) const
222221 return QVariant::fromValue(m_overriddenCategories[id]->rowCount());
223222 }
224223 return QVariant::fromValue(getResults(index.row())->rowCount());
225− case RoleCategoryIndex:
226− return QVariant::fromValue(index.row());
227224 default:
228225 return QVariant();
229226 }
plugins/Unity/categories.h+1−2
@@ -50,8 +50,7 @@ public:
5050 RoleProgressSource,
5151 RoleHints,
5252 RoleResults,
53− RoleCount,
54− RoleCategoryIndex
53+ RoleCount
5554 };
5655
5756 Q_INVOKABLE void overrideResults(const QString& categoryId, QAbstractItemModel* model);
tests/mocks/Unity/fake_categories.cpp−3
@@ -36,7 +36,6 @@ Categories::Categories(QObject* parent)
3636 m_roles[Categories::RoleHints] = "hints";
3737 m_roles[Categories::RoleResults] = "results";
3838 m_roles[Categories::RoleCount] = "count";
39− m_roles[Categories::RoleCategoryIndex] = "categoryIndex";
4039
4140 // TODO This should not be needed but accumulatting the count changes
4241 // makes the visualization more stable and also makes crashes on fast
@@ -173,8 +172,6 @@ Categories::data(const QModelIndex& index, int role) const
173172 return QVariant::fromValue(getFilter(index.row()));
174173 case RoleCount:
175174 return QVariant::fromValue(getFilter(index.row())->rowCount());
176− case RoleCategoryIndex:
177− return QVariant::fromValue(index.row());
178175 default:
179176 return QVariant();
180177 }
tests/mocks/Unity/fake_categories.h+1−2
@@ -41,8 +41,7 @@ public:
4141 RoleContentType,
4242 RoleHints,
4343 RoleResults,
44− RoleCount,
45− RoleCategoryIndex
44+ RoleCount
4645 };
4746
4847 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;