@@ -28,7 +28,7 @@ Scope::Scope(Scopes* parent) : Scope(QString(), QString(), false, parent)
31−Scope::Scope(QString const& id, QString const& name, bool favorite, Scopes* parent, int categories)
31+Scope::Scope(QString const& id, QString const& name, bool favorite, Scopes* parent, int categories, bool returnNullPreview)
32 : unity::shell::scopes::ScopeInterface(parent)
32 : unity::shell::scopes::ScopeInterface(parent)
33 , m_id(id)
33 , m_id(id)
34 , m_name(name)
34 , m_name(name)
@@ -41,6 +41,7 @@ Scope::Scope(QString const& id, QString const& name, bool favorite, Scopes* pare
41 , m_categories(new Categories(categories, this))
41 , m_categories(new Categories(categories, this))
42 , m_openScope(nullptr)
42 , m_openScope(nullptr)
43 , m_settings(new SettingsModel(this))
43 , m_settings(new SettingsModel(this))
44+ , m_returnNullPreview(returnNullPreview)
@@ -175,9 +176,16 @@ PreviewStack* Scope::preview(QVariant const& result)
176 Q_UNUSED(result);
177 Q_UNUSED(result);
179+ if (m_returnNullPreview)
178− // This probably leaks, do we don't care
185+ // This probably leaks, do we don't care
179− // it's a test after all
186+ // it's a test after all
180− return new PreviewStack;
187+ return new PreviewStack;
183void Scope::cancelActivation()
191void Scope::cancelActivation()