on xenial help sign in
And forgot i need this too
commit2485b4f93e946a0b0dca1f9a80c1a8db4cdaa75c authorAlbert Astals Cid <albert.astals@canonical.com> dateFri 27 Mar 2015, 13:30 (12 years ago) parent882aaef
4 files changed+15−4
tests/mocks/Unity/fake_scope.cpp+9 tests/mocks/Unity/fake_scope.h+4−2 tests/qmltests/Dash/tst_Dash.qml+1−1 tests/qmltests/Dash/tst_GenericScopeView.qml+1−1
tests/mocks/Unity/fake_scope.cpp+9
@@ -310,3 +310,12 @@ void Scope::setNavigationState(const QString &navigationId, bool isAltNavigation
310310 Q_EMIT currentNavigationIdChanged();
311311 }
312312}
313+
314+void Scope::performQuery(const QString& query)
315+{
316+ Q_EMIT queryPerformed(query);
317+ if (query.startsWith("scopes://")) {
318+ QString scopeId = query.mid(9);
319+ Q_EMIT gotoScope(scopeId);
320+ }
321+}
tests/mocks/Unity/fake_scope.h+4−2
@@ -72,7 +72,7 @@ public:
7272 Q_INVOKABLE unity::shell::scopes::NavigationInterface* getNavigation(QString const& navigationId) override;
7373 Q_INVOKABLE unity::shell::scopes::NavigationInterface* getAltNavigation(QString const& altNavigationId) override;
7474 Q_INVOKABLE void setNavigationState(const QString &navigationId, bool isAltNavigation) override;
75− Q_SIGNAL void performQuery(const QString& query) override;
75+ void performQuery(const QString& query) override;
7676
7777 Status status() const override;
7878 QVariantMap customizations() const override;
@@ -80,7 +80,9 @@ public:
8080 Q_INVOKABLE void refresh() override;
8181
8282Q_SIGNALS:
83− void refreshed(); // This is not in the Interface, here for testing benefits
83+ // These are not in the Interface, here for testing benefits
84+ void refreshed();
85+ void queryPerformed(const QString& query);
8486
8587protected:
8688
tests/qmltests/Dash/tst_Dash.qml+1−1
@@ -315,7 +315,7 @@ Item {
315315
316316 var scopesList = findChild(dash, "scopesList");
317317 spy.target = scopesList.scope;
318− spy.signalName = "performQuery";
318+ spy.signalName = "queryPerformed";
319319
320320 // Click on the store
321321 var scopesListPageHeader = findChild(scopesList, "pageHeader");
tests/qmltests/Dash/tst_GenericScopeView.qml+1−1
@@ -206,7 +206,7 @@ Item {
206206 var header = findChild(genericScopeView, "dashSectionHeader1");
207207
208208 spy.target = genericScopeView.scope;
209− spy.signalName = "performQuery";
209+ spy.signalName = "queryPerformed";
210210
211211 mouseClick(header);
212212