@@ -119,48 +119,6 @@ void Scopes::onScopesReordered(const unity::dash::Scopes::ScopeList& scopes)
122−void Scopes::loadMocks()
124− /* FIXME: this is temporary code that is required on mobile to order
125− the lenses according to the design.
127− QStringList staticScopes;
128− staticScopes << "mockmusic.lens" << "people.lens" << "home.lens" << "applications.lens" << "mockvideos.lens";
130− // not all the lenses are guaranteed to go into the model (only if their UnitCore counterparts exist);
131− // so build up a list of the valid ones, then add them later.
132− QList<unity::dash::Scope::Ptr> added_scopes;
134− // add statically ordered lenses
135− Q_FOREACH(QString lensId, staticScopes) {
136− unity::dash::Scope::Ptr lens = m_unityScopes->GetScope(lensId.toStdString());
138− added_scopes << lens;
142− // add remaining lenses
143− unity::dash::Scopes::ScopeList scopesList = m_unityScopes->GetScopes();
144− for(auto it = scopesList.begin(); it != scopesList.end(); ++it) {
145− unity::dash::Scope::Ptr scope = (*it);
146− if (!staticScopes.contains(QString::fromStdString(scope->id))) {
147− added_scopes << scope;
151− if (added_scopes.count() > 0) {
152− int index = rowCount();
153− beginInsertRows(QModelIndex(), index, index+added_scopes.count()-1);
154− Q_FOREACH(unity::dash::Scope::Ptr scope, added_scopes) {
155− addUnityScope(scope);
161− Q_EMIT loadedChanged(m_loaded);
164void Scopes::onScopePropertyChanged()
122void Scopes::onScopePropertyChanged()
166 QModelIndex scopeIndex = index(m_scopes.indexOf(qobject_cast<Scope*>(sender())));
124 QModelIndex scopeIndex = index(m_scopes.indexOf(qobject_cast<Scope*>(sender())));