@@ -187,19 +187,10 @@ void Scopes::addTempScope(unity::shell::scopes::ScopeInterface* scope)
187187
188188void Scopes::closeScope(unity::shell::scopes::ScopeInterface* scope)
189189{
190+ Q_ASSERT(m_tempScopes.contains(scope));
190191 m_tempScopes.remove(scope);
191192}
192193
193−unity::shell::scopes::ScopeInterface* Scopes::findTempScope(QString const& id) const
194−{
195− for (auto s: m_tempScopes) {
196− if (s->id() == id) {
197− return s;
198− }
199− }
200− return nullptr;
201−}
202−
203194void Scopes::setFavorite(const QString& scopeId, bool favorite)
204195{
205196 if (favorite) {
@@ -271,8 +262,6 @@ void Scopes::addScope(Scope* scope)
271262 beginInsertRows(QModelIndex(), index, index);
272263 m_scopes.append(scope);
273264 endInsertRows();
274− } else if (!m_tempScopes.contains(scope)) {
275− m_tempScopes.insert(scope);
276265 }
277266 m_allScopes.append(scope);
278267}