on xenial help sign in
adapt to new api
commitbb0f8064ce44189e8cad6e2fc5e699aa244d17ac authorAlbert Astals Cid <albert.astals@canonical.com> dateWed 8 Jul 2015, 11:40 (11 years ago) parentd3e105c
5 files changed+8−8
tests/mocks/Unity/CMakeLists.txt+1−1 tests/mocks/Unity/fake_scope.cpp+3−3 tests/mocks/Unity/fake_scope.h+2−2 tests/mocks/Unity/fake_scopesoverview.cpp+1−1 tests/mocks/Unity/fake_scopesoverview.h+1−1
tests/mocks/Unity/CMakeLists.txt+1−1
@@ -7,7 +7,7 @@ add_subdirectory(Notifications)
77add_subdirectory(DashCommunicator)
88
99pkg_search_module(GOBJECT gobject-2.0 REQUIRED)
10−pkg_check_modules(SCOPES_API REQUIRED unity-shell-scopes=6)
10+pkg_check_modules(SCOPES_API REQUIRED unity-shell-scopes=7)
1111
1212include_directories(
1313 ${CMAKE_CURRENT_BINARY_DIR}
tests/mocks/Unity/fake_scope.cpp+3−3
@@ -181,9 +181,9 @@ void Scope::setNoResultsHint(const QString& str)
181181 }
182182}
183183
184−void Scope::activate(QVariant const& result)
184+void Scope::activate(QVariant const& result, QString const& categoryId)
185185{
186− qDebug() << "Called activate on scope" << m_id << "with result" << result;
186+ qDebug() << "Called activate on scope" << m_id << "with result" << result << "and category" << categoryId;
187187 if (result.toString() == "Result.2.2") {
188188 Scopes *scopes = dynamic_cast<Scopes*>(parent());
189189 m_openScope = scopes->getScopeFromAll("MockScope9");
@@ -192,7 +192,7 @@ void Scope::activate(QVariant const& result)
192192 }
193193}
194194
195−PreviewStack* Scope::preview(QVariant const& result)
195+PreviewStack* Scope::preview(QVariant const& result, QString const& categoryId)
196196{
197197 Q_UNUSED(result);
198198
tests/mocks/Unity/fake_scope.h+2−2
@@ -60,8 +60,8 @@ public:
6060 Q_INVOKABLE void setName(const QString &name); // This is not invokable in the Interface, here for testing benefits
6161 Q_INVOKABLE void setSearchInProgress(const bool inProg); // This is not invokable in the Interface, here for testing benefits
6262
63− Q_INVOKABLE void activate(QVariant const& result) override;
64− Q_INVOKABLE PreviewStack* preview(QVariant const& result) override;
63+ Q_INVOKABLE void activate(QVariant const& result, QString const& categoryId) override;
64+ Q_INVOKABLE PreviewStack* preview(QVariant const& result, QString const& categoryId) override;
6565 Q_INVOKABLE void cancelActivation() override;
6666 Q_INVOKABLE void closeScope(unity::shell::scopes::ScopeInterface* scope) override;
6767
tests/mocks/Unity/fake_scopesoverview.cpp+1−1
@@ -41,7 +41,7 @@ void ScopesOverview::setSearchQuery(const QString& search_query)
4141 Q_EMIT categoriesChanged();
4242}
4343
44−Q_INVOKABLE void ScopesOverview::activate(QVariant const& result)
44+Q_INVOKABLE void ScopesOverview::activate(QVariant const& result, QString const& /*categoryId*/)
4545{
4646 Scopes *scopes = dynamic_cast<Scopes*>(parent());
4747 if (scopes->getScope(result.toString())) {
tests/mocks/Unity/fake_scopesoverview.h+1−1
@@ -32,7 +32,7 @@ public:
3232 ScopesOverview(Scopes* parent = 0);
3333
3434 void setSearchQuery(const QString& search_query) override;
35− Q_INVOKABLE void activate(QVariant const& result) override;
35+ Q_INVOKABLE void activate(QVariant const& result, QString const& categoryId) override;
3636
3737 // This is implementation detail
3838 void setFavorite(Scope *scope, bool favorite);