@@ -187,19 +187,10 @@ void Scopes::addTempScope(unity::shell::scopes::ScopeInterface* scope)
188void Scopes::closeScope(unity::shell::scopes::ScopeInterface* scope)
188void Scopes::closeScope(unity::shell::scopes::ScopeInterface* scope)
190+ Q_ASSERT(m_tempScopes.contains(scope));
190 m_tempScopes.remove(scope);
191 m_tempScopes.remove(scope);
193−unity::shell::scopes::ScopeInterface* Scopes::findTempScope(QString const& id) const
195− for (auto s: m_tempScopes) {
196− if (s->id() == id) {
203void Scopes::setFavorite(const QString& scopeId, bool favorite)
194void Scopes::setFavorite(const QString& scopeId, bool favorite)
205 if (favorite) {
196 if (favorite) {
@@ -271,8 +262,6 @@ void Scopes::addScope(Scope* scope)
271 beginInsertRows(QModelIndex(), index, index);
262 beginInsertRows(QModelIndex(), index, index);
272 m_scopes.append(scope);
263 m_scopes.append(scope);
273 endInsertRows();
264 endInsertRows();
274− } else if (!m_tempScopes.contains(scope)) {
275− m_tempScopes.insert(scope);
277 m_allScopes.append(scope);
266 m_allScopes.append(scope);