Merge lp:~aacid/unity-api/scopes-as-apps into lp:unity-api

Proposed by Albert Astals Cid on 2015-03-12
Status: Rejected
Rejected by: Albert Astals Cid on 2015-10-26
Proposed branch: lp:~aacid/unity-api/scopes-as-apps
Merge into: lp:unity-api
Diff against target: 677 lines (+32/-424)
9 files modified
include/unity/shell/scopes/ScopeInterface.h (+10/-31)
include/unity/shell/scopes/ScopesInterface.h (+0/-131)
test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt (+0/-2)
test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.cpp (+16/-25)
test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.h (+1/-4)
test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScopes.cpp (+0/-99)
test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScopes.h (+0/-55)
test/qmltest/mocks/plugins/Unity/Scopes/TestScopesPlugin.cpp (+1/-3)
test/qmltest/unity/shell/scopes/tst_Scopes.qml (+4/-74)
To merge this branch: bzr merge lp:~aacid/unity-api/scopes-as-apps
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve on 2015-03-12
Paweł Stołowski 2015-03-12 Pending
Michał Sawicz 2015-03-12 Pending
Unity Team 2015-03-12 Pending
Review via email: mp+252705@code.launchpad.net

Commit Message

New api for scopes as apps

To post a comment you must log in.
lp:~aacid/unity-api/scopes-as-apps updated on 2015-03-12
171. By Albert Astals Cid on 2015-03-12

New api for scopes as apps

lp:~aacid/unity-api/scopes-as-apps updated on 2015-03-12
172. By Albert Astals Cid on 2015-03-12

And now make it compile

PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Lukáš Tinkl (lukas-kde) :

Unmerged revisions

172. By Albert Astals Cid on 2015-03-12

And now make it compile

171. By Albert Astals Cid on 2015-03-12

New api for scopes as apps

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/unity/shell/scopes/ScopeInterface.h'
2--- include/unity/shell/scopes/ScopeInterface.h 2014-08-04 15:59:13 +0000
3+++ include/unity/shell/scopes/ScopeInterface.h 2015-03-12 14:25:13 +0000
4@@ -1,5 +1,5 @@
5 /*
6- * Copyright (C) 2014 Canonical, Ltd.
7+ * Copyright (C) 2014, 2015 Canonical, Ltd.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11@@ -46,7 +46,7 @@
12 /**
13 * @brief Id of the scope.
14 */
15- Q_PROPERTY(QString id READ id NOTIFY idChanged)
16+ Q_PROPERTY(QString scopeId READ id WRITE setId NOTIFY idChanged)
17
18 /**
19 * @brief Display name of the scope.
20@@ -74,10 +74,6 @@
21 Q_PROPERTY(bool searchInProgress READ searchInProgress NOTIFY searchInProgressChanged)
22
23 /**
24- * @brief Boolean specifying whether the scope is favourited.
25- */
26- Q_PROPERTY(bool favorite READ favorite WRITE setFavorite NOTIFY favoriteChanged)
27- /**
28 * @brief Keyboard shortcut used to summon the scope.
29 */
30 Q_PROPERTY(QString shortcut READ shortcut NOTIFY shortcutChanged)
31@@ -173,7 +169,6 @@
32 virtual QString searchHint() const = 0;
33 virtual QString shortcut() const = 0;
34 virtual bool searchInProgress() const = 0;
35- virtual bool favorite() const = 0;
36 virtual CategoriesInterface* categories() const = 0;
37 virtual SettingsModelInterface* settings() const = 0;
38 virtual QString searchQuery() const = 0;
39@@ -188,11 +183,11 @@
40 virtual QVariantMap customizations() const = 0;
41
42 /* setters */
43+ virtual void setId(const QString& id) = 0;
44 virtual void setSearchQuery(const QString& search_query) = 0;
45 virtual void setNoResultsHint(const QString& hint) = 0;
46 virtual void setFormFactor(const QString& form_factor) = 0;
47 virtual void setActive(const bool) = 0;
48- virtual void setFavorite(const bool) = 0;
49 // @endcond
50
51 /**
52@@ -251,7 +246,6 @@
53 void descriptionChanged();
54 void searchHintChanged();
55 void searchInProgressChanged();
56- void favoriteChanged();
57 void shortcutChanged();
58 void categoriesChanged();
59 void settingsChanged();
60@@ -270,24 +264,18 @@
61
62 // signals triggered by activate(..) or preview(..) requests.
63 /**
64- * @brief Signal requesting to show the dash.
65- *
66- * This signal is usually emitted after activating a result.
67- */
68- void showDash();
69-
70- /**
71- * @brief Signal requesting to hide the dash.
72- *
73- * This signal is usually emitted after activating a result.
74- */
75- void hideDash();
76+ * @brief Signal requesting to hide settings/previews.
77+ *
78+ * This signal is usually emitted after activating a result.
79+ */
80+ void gotoRootWindow();
81
82 /**
83 * @brief Signal requesting to open a uri.
84 *
85 * This signal is usually emitted after activating a result.
86 */
87+ // TODO Evaluate if we really need, not listened by the UI
88 void gotoUri(QString const& uri);
89
90 /**
91@@ -295,17 +283,8 @@
92 *
93 * This signal is usually emitted after activating a result.
94 */
95+ // TODO Evaluate if we really need, not listened by the UI
96 void previewRequested(QVariant const& result);
97-
98- /**
99- * @brief Signal requesting to change the currently focused scope.
100- */
101- void gotoScope(QString const& scopeId);
102-
103- /**
104- * @brief Signal requesting to show a temporary scope.
105- */
106- void openScope(unity::shell::scopes::ScopeInterface* scope);
107 };
108
109 }
110
111=== removed file 'include/unity/shell/scopes/ScopesInterface.h'
112--- include/unity/shell/scopes/ScopesInterface.h 2015-02-04 17:24:55 +0000
113+++ include/unity/shell/scopes/ScopesInterface.h 1970-01-01 00:00:00 +0000
114@@ -1,131 +0,0 @@
115-/*
116- * Copyright (C) 2014 Canonical, Ltd.
117- *
118- * This program is free software; you can redistribute it and/or modify
119- * it under the terms of the GNU General Public License as published by
120- * the Free Software Foundation; version 3.
121- *
122- * This program is distributed in the hope that it will be useful,
123- * but WITHOUT ANY WARRANTY; without even the implied warranty of
124- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
125- * GNU General Public License for more details.
126- *
127- * You should have received a copy of the GNU General Public License
128- * along with this program. If not, see <http://www.gnu.org/licenses/>.
129- */
130-
131-#ifndef UNITY_SHELL_SCOPES_SCOPESINTERFACE_H
132-#define UNITY_SHELL_SCOPES_SCOPESINTERFACE_H
133-
134-#include <unity/SymbolExport.h>
135-
136-#include <QAbstractListModel>
137-
138-namespace unity
139-{
140-namespace shell
141-{
142-namespace scopes
143-{
144-
145-class ScopeInterface;
146-
147-/**
148- * @brief A list of scopes to display in the UI.
149- *
150- * This model exposes information about scopes that should be shown by the dash.
151- */
152-class UNITY_API ScopesInterface : public QAbstractListModel
153-{
154- Q_OBJECT
155-
156- Q_ENUMS(Roles)
157-
158- /**
159- * @brief Boolean indicating whether asynchronous populating of the model finished.
160- */
161- Q_PROPERTY(bool loaded READ loaded NOTIFY loadedChanged)
162-
163- /**
164- * @brief Interger specifying how many items are in the model.
165- */
166- Q_PROPERTY(int count READ count NOTIFY countChanged)
167-
168- /**
169- * @brief Scope instance representing the overview scope.
170- *
171- * Scope instance representing the overview scope, note that it might be null while scopes are not loaded.
172- */
173- Q_PROPERTY(unity::shell::scopes::ScopeInterface* overviewScope READ overviewScope NOTIFY overviewScopeChanged)
174-
175-protected:
176- /// @cond
177- explicit ScopesInterface(QObject* parent = 0) : QAbstractListModel(parent) { }
178- /// @endcond
179-
180-public:
181- /**
182- * @brief Roles supported by the model.
183- */
184- enum Roles {
185- RoleScope,
186- RoleId,
187- RoleTitle
188- };
189-
190- /**
191- * @brief Get ScopeInterface instance associated with a row.
192- *
193- * Returns ScopeInterface instance associated with a row or null when
194- * supplied with incorrect index.
195- */
196- Q_INVOKABLE virtual unity::shell::scopes::ScopeInterface* getScope(int row) const = 0;
197-
198- /**
199- * @brief Get ScopeInterface instance by scope id.
200- *
201- * Returns ScopeInterface instance which with the supplied scope id or null.
202- */
203- Q_INVOKABLE virtual unity::shell::scopes::ScopeInterface* getScope(QString const& scopeId) const = 0;
204-
205- /**
206- * @brief Set the favorite bit of the given scope.
207- */
208- Q_INVOKABLE virtual void setFavorite(QString const& scopeId, bool favorite) = 0;
209-
210- /**
211- * @brief Move the given favorite scope to the given index.
212- */
213- Q_INVOKABLE virtual void moveFavoriteTo(QString const& scopeId, int index) = 0;
214-
215- // @cond
216- virtual bool loaded() const = 0;
217- virtual int count() const = 0;
218- virtual unity::shell::scopes::ScopeInterface* overviewScope() const = 0;
219- QHash<int, QByteArray> roleNames() const override
220- {
221- QHash<int, QByteArray> roles;
222- roles[RoleScope] = "scope";
223- roles[RoleId] = "id";
224- roles[RoleTitle] = "title";
225- return roles;
226- }
227- // @endcond
228-
229- Q_INVOKABLE virtual void closeScope(unity::shell::scopes::ScopeInterface* scope) = 0;
230-
231-Q_SIGNALS:
232- // @cond
233- void loadedChanged();
234- void countChanged();
235- void overviewScopeChanged();
236- // @endcond
237-};
238-
239-}
240-}
241-}
242-
243-Q_DECLARE_METATYPE(unity::shell::scopes::ScopesInterface*)
244-
245-#endif
246
247=== modified file 'test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt'
248--- test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt 2014-07-25 15:17:40 +0000
249+++ test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt 2015-03-12 14:25:13 +0000
250@@ -18,7 +18,6 @@
251 Mocks/MockPreviewStack.cpp
252 Mocks/MockPreviewWidgetModel.cpp
253 Mocks/MockScope.cpp
254- Mocks/MockScopes.cpp
255 Mocks/MockSettingsModel.cpp
256 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/CategoriesInterface.h
257 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/NavigationInterface.h
258@@ -27,7 +26,6 @@
259 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/PreviewWidgetModelInterface.h
260 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/PreviewStackInterface.h
261 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/ScopeInterface.h
262- ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/ScopesInterface.h
263 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/SettingsModelInterface.h
264 )
265
266
267=== modified file 'test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.cpp'
268--- test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.cpp 2014-08-04 15:59:13 +0000
269+++ test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.cpp 2015-03-12 14:25:13 +0000
270@@ -20,20 +20,13 @@
271 #include "MockDepartment.h"
272 #include "MockSettingsModel.h"
273
274-MockScope::MockScope(QObject* parent) : MockScope(QString(), QString(), parent)
275-{
276-}
277-
278-MockScope::MockScope(QString const& id, QString const& name, QObject* parent)
279- : unity::shell::scopes::ScopeInterface(parent)
280- , m_id(id)
281- , m_name(name)
282- , m_favorite(false)
283- , m_searching(false)
284- , m_isActive(false)
285- , m_previewRendererName("preview-generic")
286- , m_categories(new MockCategories(20, this))
287- , m_settings(new MockSettingsModel(this))
288+MockScope::MockScope(QObject* parent)
289+ : unity::shell::scopes::ScopeInterface(parent)
290+ , m_searching(false)
291+ , m_isActive(false)
292+ , m_previewRendererName("preview-generic")
293+ , m_categories(new MockCategories(20, this))
294+ , m_settings(new MockSettingsModel(this))
295 {
296 }
297
298@@ -93,10 +86,6 @@
299 return m_formFactor;
300 }
301
302-bool MockScope::favorite() const {
303- return m_favorite;
304-}
305-
306 bool MockScope::isActive() const {
307 return m_isActive;
308 }
309@@ -117,6 +106,15 @@
310 return ScopeInterface::Status::Okay;
311 }
312
313+void MockScope::setId(const QString& id) {
314+ if (id != m_id) {
315+ m_id = id;
316+ Q_EMIT idChanged();
317+
318+ setName(id+"name");
319+ }
320+}
321+
322 void MockScope::setName(const QString &str) {
323 if (str != m_name) {
324 m_name = str;
325@@ -145,13 +143,6 @@
326 }
327 }
328
329-void MockScope::setFavorite(const bool value) {
330- if (value != m_favorite) {
331- m_favorite = value;
332- Q_EMIT favoriteChanged();
333- }
334-}
335-
336 void MockScope::setNoResultsHint(const QString& str) {
337 if (str != m_noResultsHint) {
338 m_noResultsHint = str;
339
340=== modified file 'test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.h'
341--- test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.h 2014-08-04 15:59:13 +0000
342+++ test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.h 2015-03-12 14:25:13 +0000
343@@ -25,7 +25,6 @@
344
345 public:
346 MockScope(QObject* parent = 0);
347- MockScope(QString const& id, QString const& name, QObject* parent);
348
349 /* getters */
350 QString id() const override;
351@@ -33,7 +32,6 @@
352 QString iconHint() const override;
353 QString description() const override;
354 QString searchHint() const override;
355- bool favorite() const override;
356 QString shortcut() const override;
357 bool searchInProgress() const override;
358 unity::shell::scopes::CategoriesInterface* categories() const override;
359@@ -51,11 +49,11 @@
360
361 /* setters */
362 void setName(const QString& name);
363+ void setId(const QString& id) override;
364 void setSearchQuery(const QString& search_query) override;
365 void setNoResultsHint(const QString& hint) override;
366 void setFormFactor(const QString& form_factor) override;
367 void setActive(const bool) override;
368- void setFavorite(const bool) override;
369
370 Q_INVOKABLE void activate(QVariant const& result) override;
371 Q_INVOKABLE unity::shell::scopes::PreviewStackInterface* preview(QVariant const& result) override;
372@@ -77,7 +75,6 @@
373 QString m_formFactor;
374 QString m_currentDepartmentId;
375 QString m_currentAltDepartmentId;
376- bool m_favorite;
377 bool m_searching;
378 bool m_isActive;
379 bool m_hasNavigation;
380
381=== removed file 'test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScopes.cpp'
382--- test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScopes.cpp 2015-02-12 14:51:13 +0000
383+++ test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScopes.cpp 1970-01-01 00:00:00 +0000
384@@ -1,99 +0,0 @@
385-/*
386- * Copyright (C) 2014 Canonical, Ltd.
387- *
388- * This program is free software; you can redistribute it and/or modify
389- * it under the terms of the GNU General Public License as published by
390- * the Free Software Foundation; version 3.
391- *
392- * This program is distributed in the hope that it will be useful,
393- * but WITHOUT ANY WARRANTY; without even the implied warranty of
394- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
395- * GNU General Public License for more details.
396- *
397- * You should have received a copy of the GNU General Public License
398- * along with this program. If not, see <http://www.gnu.org/licenses/>.
399- *
400- */
401-
402-// Self
403-#include "MockScopes.h"
404-
405-#include "MockScope.h"
406-
407-MockScopes::MockScopes(QObject *parent)
408- : unity::shell::scopes::ScopesInterface(parent)
409-{
410- m_scopes << new MockScope("MockScope1", "People", this);
411- m_scopes << new MockScope("MockScope2", "Music", this);
412- m_scopes << new MockScope("MockScope3", "Apps", this);
413- m_scopes << new MockScope("MockScope4", "Videos", this);
414-}
415-
416-bool MockScopes::loaded() const
417-{
418- return true;
419-}
420-
421-unity::shell::scopes::ScopeInterface* MockScopes::overviewScope() const
422-{
423- return nullptr;
424-}
425-
426-int MockScopes::rowCount(const QModelIndex&) const
427-{
428- return m_scopes.count();
429-}
430-
431-int MockScopes::count() const
432-{
433- return m_scopes.count();
434-}
435-
436-QVariant MockScopes::data(const QModelIndex& index, int role) const
437-{
438- if (!index.isValid() || index.row() >= m_scopes.size()) {
439- return QVariant();
440- }
441-
442- MockScope* scope = m_scopes.at(index.row());
443-
444- if (role == MockScopes::RoleScope) {
445- return QVariant::fromValue(scope);
446- } else if (role == MockScopes::RoleId) {
447- return QVariant::fromValue(scope->id());
448- } else if (role == MockScopes::RoleTitle) {
449- return QVariant::fromValue(scope->name());
450- } else {
451- return QVariant();
452- }
453-}
454-
455-unity::shell::scopes::ScopeInterface* MockScopes::getScope(int row) const
456-{
457- if (row < 0 || row >= m_scopes.size()) {
458- return nullptr;
459- }
460-
461- return m_scopes[row];
462-}
463-
464-unity::shell::scopes::ScopeInterface* MockScopes::getScope(QString const&) const
465-{
466- // Unimplemented
467- return nullptr;
468-}
469-
470-void MockScopes::setFavorite(QString const&, bool)
471-{
472- // Unimplemented
473-}
474-
475-void MockScopes::moveFavoriteTo(QString const&, int)
476-{
477- // Unimplemented
478-}
479-
480-void MockScopes::closeScope(unity::shell::scopes::ScopeInterface*)
481-{
482- // Unimplemented
483-}
484
485=== removed file 'test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScopes.h'
486--- test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScopes.h 2015-02-12 14:51:13 +0000
487+++ test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScopes.h 1970-01-01 00:00:00 +0000
488@@ -1,55 +0,0 @@
489-/*
490- * Copyright (C) 2014 Canonical, Ltd.
491- *
492- * This program is free software; you can redistribute it and/or modify
493- * it under the terms of the GNU General Public License as published by
494- * the Free Software Foundation; version 3.
495- *
496- * This program is distributed in the hope that it will be useful,
497- * but WITHOUT ANY WARRANTY; without even the implied warranty of
498- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
499- * GNU General Public License for more details.
500- *
501- * You should have received a copy of the GNU General Public License
502- * along with this program. If not, see <http://www.gnu.org/licenses/>.
503- *
504- */
505-
506-#ifndef MOCK_SCOPES_H
507-#define MOCK_SCOPES_H
508-
509-#include <unity/shell/scopes/ScopesInterface.h>
510-
511-// Qt
512-#include <QList>
513-
514-class MockScope;
515-
516-class UNITY_API MockScopes : public unity::shell::scopes::ScopesInterface
517-{
518- Q_OBJECT
519-
520-public:
521- MockScopes(QObject *parent = 0);
522-
523- Q_INVOKABLE int rowCount(const QModelIndex& parent = QModelIndex()) const override;
524-
525- Q_INVOKABLE unity::shell::scopes::ScopeInterface* getScope(int row) const override;
526- Q_INVOKABLE unity::shell::scopes::ScopeInterface* getScope(const QString& scope_id) const override;
527- Q_INVOKABLE void closeScope(unity::shell::scopes::ScopeInterface* scope) override;
528-
529- QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
530-
531- bool loaded() const override;
532- int count() const override;
533- unity::shell::scopes::ScopeInterface* overviewScope() const override;
534-
535- void setFavorite(QString const& scopeId, bool favorite) override;
536- void moveFavoriteTo(QString const& scopeId, int index) override;
537-
538-private:
539- QList<MockScope*> m_scopes;
540- QHash<int, QByteArray> m_roles;
541-};
542-
543-#endif // SCOPES_H
544
545=== modified file 'test/qmltest/mocks/plugins/Unity/Scopes/TestScopesPlugin.cpp'
546--- test/qmltest/mocks/plugins/Unity/Scopes/TestScopesPlugin.cpp 2014-07-25 15:17:40 +0000
547+++ test/qmltest/mocks/plugins/Unity/Scopes/TestScopesPlugin.cpp 2015-03-12 14:25:13 +0000
548@@ -26,13 +26,11 @@
549 #include "PreviewWidgetModelInterface.h"
550 #include "PreviewStackInterface.h"
551 #include "SettingsModelInterface.h"
552-#include "Mocks/MockScopes.h"
553 #include "Mocks/MockScope.h"
554
555 void TestScopesPlugin::registerTypes(const char* uri)
556 {
557- qmlRegisterType<MockScopes>(uri, 0, 2, "Scopes");
558- qmlRegisterUncreatableType<unity::shell::scopes::ScopeInterface>(uri, 0, 2, "Scope", "Can't create Categories object in QML. Get them from Scopes instance.");
559+ qmlRegisterType<MockScope>(uri, 0, 2, "Scope");
560 qmlRegisterUncreatableType<unity::shell::scopes::CategoriesInterface>(uri, 0, 2, "Categories", "Can't create Categories object in QML. Get them from Scope instance.");
561 qmlRegisterUncreatableType<unity::shell::scopes::NavigationInterface>(uri, 0, 2, "Navigation", "Can't create Navigation object in QML. Get them from Scope instance.");
562 qmlRegisterUncreatableType<unity::shell::scopes::ResultsModelInterface>(uri, 0, 2, "ResultsModel", "Can't create new ResultsModel in QML. Get them from Categories instance.");
563
564=== modified file 'test/qmltest/unity/shell/scopes/tst_Scopes.qml'
565--- test/qmltest/unity/shell/scopes/tst_Scopes.qml 2014-08-04 15:59:13 +0000
566+++ test/qmltest/unity/shell/scopes/tst_Scopes.qml 2015-03-12 14:25:13 +0000
567@@ -23,79 +23,13 @@
568 Item {
569 id: root
570
571- Scopes {
572- id: scopes
573+ property var scope: Scope {
574+ scopeId: "myscope"
575 }
576- property var scope: scopes.getScope(0)
577 property var preview: root.scope.preview("")
578 property var navigation: root.scope.getNavigation("root")
579
580 Verifier {
581- id: scopesVerifier
582-
583- Repeater {
584- id: repeater
585- model: scopes
586- delegate: Item {
587- property var roles: model
588- }
589- }
590-
591- function test_scopes_data() {
592- return [
593- { tag: "Scopes[object]", type: "object" },
594- { tag: "Scopes[ScopesInterface]", type: "unity::shell::scopes::ScopesInterface" },
595- ];
596- }
597-
598- function test_scopes(data) {
599- object = repeater.model;
600- name = "Scopes";
601- verifyData(data);
602- }
603-
604- function test_scopes_roles_data() {
605- return [
606- { tag: "Model.roles[scope]", role: "scope", type: "object" },
607- { tag: "Model.roles[id]", role: "id", type: "string" },
608- { tag: "Model.roles[title]", role: "title", type: "string" },
609- ];
610- }
611-
612- function test_scopes_roles(data) {
613- object = repeater.itemAt(0).roles;
614- name = "Scopes";
615- verifyData(data);
616- }
617-
618- function test_scopes_properties_data() {
619- return [
620- { tag: "Item.properties[loaded]", constant: "loaded", type: "boolean" },
621- { tag: "Item.properties[count]", constant: "count", type: "number" },
622- { tag: "Item.properties[overviewScope]", constant: "overviewScope", type: "object" }
623- ];
624- }
625-
626- function test_scopes_properties(data) {
627- object = repeater.model;
628- name = "Scopes";
629- verifyData(data);
630- }
631-
632- function test_scopes_methods_data() {
633- return [
634- { tag: "Model.methods[get]", method: "getScope" }
635- ];
636- }
637-
638- function test_scopes_methods(data) {
639- object = repeater.model;
640- name = "Scopes"
641- verifyData(data);
642- }
643- }
644-
645- Verifier {
646 id: scopeVerifier
647
648 function test_scope_data() {
649@@ -113,13 +47,12 @@
650
651 function test_scope_properties_data() {
652 return [
653- { tag: "Item.properties[id]", constant: "id", type: "string" },
654+ { tag: "Item.properties[scopeId]", constant: "scopeId", type: "string" },
655 { tag: "Item.properties[name]", constant: "name", type: "string" },
656 { tag: "Item.properties[iconHint]", constant: "iconHint", type: "string" },
657 { tag: "Item.properties[description]", constant: "description", type: "string" },
658 { tag: "Item.properties[searchHint]", constant: "searchHint", type: "string" },
659 { tag: "Item.properties[searchInProgress]", constant: "searchInProgress", type: "boolean" },
660- { tag: "Item.properties[favorite]", constant: "favorite", type: "boolean" },
661 { tag: "Item.properties[shortcut]", constant: "shortcut", type: "string" },
662 { tag: "Item.properties[categories]", constant: "categories", type: "object" },
663 { tag: "Item.properties[searchQuery]", constant: "searchQuery", type: "string" },
664@@ -147,12 +80,9 @@
665 { tag: "Model.methods[preview]", method: "preview" },
666 { tag: "Model.methods[cancelActivation]", method: "cancelActivation" },
667 { tag: "Model.methods[closeScope]", method: "closeScope" },
668- { tag: "Model.methods[showDash]", method: "showDash" },
669- { tag: "Model.methods[hideDash]", method: "hideDash" },
670+ { tag: "Model.methods[gotoRootWindow]", method: "gotoRootWindow" },
671 { tag: "Model.methods[gotoUri]", method: "gotoUri" },
672 { tag: "Model.methods[previewRequested]", method: "previewRequested" },
673- { tag: "Model.methods[gotoScope]", method: "gotoScope" },
674- { tag: "Model.methods[openScope]", method: "openScope" },
675 { tag: "Model.methods[performQuery]", method: "performQuery" },
676 { tag: "Model.methods[refresh]", method: "refresh" },
677 { tag: "Model.methods[getNavigation]", method: "getNavigation" },

Subscribers

People subscribed via source and target branches

to all changes: