@@ -49,9 +49,9 @@ Scopes::~Scopes()
49void Scopes::updateScopes()
49void Scopes::updateScopes()
52− addScope(new Scope("MockScope1", "People", true, this));
53 addScope(new Scope("MockScope2", "Music", false, this));
52 addScope(new Scope("MockScope2", "Music", false, this));
54 addScope(new Scope("clickscope", "Apps", true, this));
53 addScope(new Scope("clickscope", "Apps", true, this));
54+ addScope(new Scope("MockScope1", "People", true, this));
55 addScope(new Scope("MockScope5", "Videos", true, this));
55 addScope(new Scope("MockScope5", "Videos", true, this));
56 addScope(new Scope("SingleCategoryScope", "Single", true, this, 1));
56 addScope(new Scope("SingleCategoryScope", "Single", true, this, 1));
57 addScope(new Scope("MockScope4", "MS4", true, this));
57 addScope(new Scope("MockScope4", "MS4", true, this));
@@ -198,6 +198,22 @@ void Scopes::setFavorite(const QString& scopeId, bool favorite)
201+void Scopes::moveFavoriteTo(const QString& scopeId, int index)
204+ for (int i = 0; i < m_scopes.count(); ++i) {
205+ if (m_scopes[i]->id() == scopeId) {
210+ Q_ASSERT(origIndex != -1);
211+ beginMoveRows(QModelIndex(), origIndex, origIndex, QModelIndex(), index);
212+ m_scopes.move(origIndex, index);
214+ m_scopesOverview->moveFavoriteTo(m_scopes[index], index);
201QList<Scope*> Scopes::favScopes() const
217QList<Scope*> Scopes::favScopes() const
203 return m_scopes;
219 return m_scopes;