Merge lp:~stolowski/unity-api/single-preview into lp:unity-api

Proposed by Paweł Stołowski
Status: Superseded
Proposed branch: lp:~stolowski/unity-api/single-preview
Merge into: lp:unity-api
Diff against target: 487 lines (+29/-284)
11 files modified
debian/changelog (+7/-0)
include/unity/shell/scopes/CMakeLists.txt (+1/-1)
include/unity/shell/scopes/PreviewStackInterface.h (+0/-99)
include/unity/shell/scopes/ScopeInterface.h (+10/-3)
test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt (+0/-2)
test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockPreviewStack.cpp (+0/-63)
test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockPreviewStack.h (+0/-47)
test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.cpp (+7/-3)
test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.h (+2/-1)
test/qmltest/mocks/plugins/Unity/Scopes/TestScopesPlugin.cpp (+1/-3)
test/qmltest/unity/shell/scopes/tst_Scopes.qml (+1/-62)
To merge this branch: bzr merge lp:~stolowski/unity-api/single-preview
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+286359@code.launchpad.net

This proposal has been superseded by a proposal from 2016-02-18.

Commit message

Removed PreviewStackInterface. Changed ScopeInterface to return single preview.

Description of the change

Removed PreviewStackInterface. Changed ScopeInterface to return single preview.

To post a comment you must log in.
209. By Paweł Stołowski

Merged trunk

210. By Paweł Stołowski

Bump version

211. By Paweł Stołowski

Merged activation-progress

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2016-02-11 23:53:29 +0000
+++ debian/changelog 2016-02-18 15:46:52 +0000
@@ -1,3 +1,10 @@
1unity-api (7.107) UNRELEASED; urgency=medium
2
3 * Removed PreviewStackInterface, modified ScopeInterface to return
4 PreviewModelInterface on preview().
5
6 -- Pawel Stolowski <pawel.stolowski@canonical.com> Wed, 17 Feb 2016 17:46:13 +0100
7
1unity-api (7.106+16.04.20160211.1-0ubuntu1) xenial; urgency=medium8unity-api (7.106+16.04.20160211.1-0ubuntu1) xenial; urgency=medium
29
3 [ Daniel d'Andrada ]10 [ Daniel d'Andrada ]
411
=== modified file 'include/unity/shell/scopes/CMakeLists.txt'
--- include/unity/shell/scopes/CMakeLists.txt 2015-11-30 09:18:57 +0000
+++ include/unity/shell/scopes/CMakeLists.txt 2016-02-18 15:46:52 +0000
@@ -7,7 +7,7 @@
77
8set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)8set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)
99
10set(VERSION 9)10set(VERSION 10)
11set(PKGCONFIG_NAME "unity-shell-scopes")11set(PKGCONFIG_NAME "unity-shell-scopes")
12set(PKGCONFIG_DESCRIPTION "Unity shell Scopes APIs")12set(PKGCONFIG_DESCRIPTION "Unity shell Scopes APIs")
13set(PKGCONFIG_REQUIRES "Qt5Core")13set(PKGCONFIG_REQUIRES "Qt5Core")
1414
=== removed file 'include/unity/shell/scopes/PreviewStackInterface.h'
--- include/unity/shell/scopes/PreviewStackInterface.h 2014-05-19 09:24:42 +0000
+++ include/unity/shell/scopes/PreviewStackInterface.h 1970-01-01 00:00:00 +0000
@@ -1,99 +0,0 @@
1/*
2 * Copyright (C) 2014 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef UNITY_SHELL_SCOPES_PREVIEWSTACKINTERFACE_H
18#define UNITY_SHELL_SCOPES_PREVIEWSTACKINTERFACE_H
19
20#include <unity/SymbolExport.h>
21
22#include <QAbstractListModel>
23
24namespace unity
25{
26namespace shell
27{
28namespace scopes
29{
30
31class PreviewModelInterface;
32
33/**
34 * @brief A master model for previews.
35 *
36 * Each item in this model represents an individual preview, where each is stacked
37 * on top of the previous one. Item on index 0 is always the one on the very bottom
38 * of the stack.
39 */
40class UNITY_API PreviewStackInterface : public QAbstractListModel
41{
42 Q_OBJECT
43
44 Q_ENUMS(Roles)
45
46 /**
47 * @brief Number of columns the individual previews should expose.
48 *
49 * Previews can be laid out in a different number of columns - for example the number
50 * of desired columns can change when changing orientation of the display and
51 * therefore there's more horizontal space available.
52 */
53 Q_PROPERTY(int widgetColumnCount READ widgetColumnCount WRITE setWidgetColumnCount NOTIFY widgetColumnCountChanged)
54
55protected:
56 /// @cond
57 explicit PreviewStackInterface(QObject* parent = 0) : QAbstractListModel(parent) { }
58 /// @endcond
59
60public:
61 /**
62 * @brief The roles supported by this model.
63 */
64 enum Roles {
65 RolePreviewModel
66 };
67
68 /**
69 * @brief Get preview model at a particular index.
70 *
71 * Return PreviewModelInterface instance at a particular index or nullptr
72 * if the index is out of bounds.
73 */
74 Q_INVOKABLE virtual unity::shell::scopes::PreviewModelInterface* getPreviewModel(int index) const = 0;
75
76 // @cond
77 virtual void setWidgetColumnCount(int columnCount) = 0;
78 virtual int widgetColumnCount() const = 0;
79 QHash<int, QByteArray> roleNames() const override
80 {
81 QHash<int, QByteArray> roles;
82 roles[RolePreviewModel] = "previewModel";
83 return roles;
84 }
85 // @endcond
86
87Q_SIGNALS:
88 // @cond
89 void widgetColumnCountChanged();
90 // @endcond
91};
92
93}
94}
95}
96
97Q_DECLARE_METATYPE(unity::shell::scopes::PreviewStackInterface*)
98
99#endif
1000
=== modified file 'include/unity/shell/scopes/ScopeInterface.h'
--- include/unity/shell/scopes/ScopeInterface.h 2015-10-05 12:54:22 +0000
+++ include/unity/shell/scopes/ScopeInterface.h 2016-02-18 15:46:52 +0000
@@ -30,7 +30,7 @@
30{30{
3131
32class CategoriesInterface;32class CategoriesInterface;
33class PreviewStackInterface;33class PreviewModelInterface;
34class NavigationInterface;34class NavigationInterface;
35class SettingsModelInterface;35class SettingsModelInterface;
3636
@@ -74,6 +74,11 @@
74 Q_PROPERTY(bool searchInProgress READ searchInProgress NOTIFY searchInProgressChanged)74 Q_PROPERTY(bool searchInProgress READ searchInProgress NOTIFY searchInProgressChanged)
7575
76 /**76 /**
77 * @brief Boolean specifying whether an activation request is currently running.
78 */
79 Q_PROPERTY(bool activationInProgress READ activationInProgress NOTIFY activationInProgressChanged)
80
81 /**
77 * @brief Boolean specifying whether the scope is favourited.82 * @brief Boolean specifying whether the scope is favourited.
78 */83 */
79 Q_PROPERTY(bool favorite READ favorite WRITE setFavorite NOTIFY favoriteChanged)84 Q_PROPERTY(bool favorite READ favorite WRITE setFavorite NOTIFY favoriteChanged)
@@ -173,6 +178,7 @@
173 virtual QString searchHint() const = 0;178 virtual QString searchHint() const = 0;
174 virtual QString shortcut() const = 0;179 virtual QString shortcut() const = 0;
175 virtual bool searchInProgress() const = 0;180 virtual bool searchInProgress() const = 0;
181 virtual bool activationInProgress() const = 0;
176 virtual bool favorite() const = 0;182 virtual bool favorite() const = 0;
177 virtual CategoriesInterface* categories() const = 0;183 virtual CategoriesInterface* categories() const = 0;
178 virtual SettingsModelInterface* settings() const = 0;184 virtual SettingsModelInterface* settings() const = 0;
@@ -203,10 +209,10 @@
203 /**209 /**
204 * @brief Method used to preview a result.210 * @brief Method used to preview a result.
205 *211 *
206 * Returns a new PreviewStackInterface instance. It's caller's responsibility212 * Returns a new PreviewModelInterface instance. It's caller's responsibility
207 * to free it.213 * to free it.
208 */214 */
209 Q_INVOKABLE virtual unity::shell::scopes::PreviewStackInterface* preview(QVariant const& result, QString const& categoryId) = 0;215 Q_INVOKABLE virtual unity::shell::scopes::PreviewModelInterface* preview(QVariant const& result, QString const& categoryId) = 0;
210216
211 /**217 /**
212 * @brief Cancels the current activation.218 * @brief Cancels the current activation.
@@ -256,6 +262,7 @@
256 void descriptionChanged();262 void descriptionChanged();
257 void searchHintChanged();263 void searchHintChanged();
258 void searchInProgressChanged();264 void searchInProgressChanged();
265 void activationInProgressChanged();
259 void favoriteChanged();266 void favoriteChanged();
260 void shortcutChanged();267 void shortcutChanged();
261 void categoriesChanged();268 void categoriesChanged();
262269
=== modified file 'test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt'
--- test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt 2014-07-25 15:17:40 +0000
+++ test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt 2016-02-18 15:46:52 +0000
@@ -15,7 +15,6 @@
15 Mocks/MockDepartment.cpp15 Mocks/MockDepartment.cpp
16 Mocks/MockResultsModel.cpp16 Mocks/MockResultsModel.cpp
17 Mocks/MockPreviewModel.cpp17 Mocks/MockPreviewModel.cpp
18 Mocks/MockPreviewStack.cpp
19 Mocks/MockPreviewWidgetModel.cpp18 Mocks/MockPreviewWidgetModel.cpp
20 Mocks/MockScope.cpp19 Mocks/MockScope.cpp
21 Mocks/MockScopes.cpp20 Mocks/MockScopes.cpp
@@ -25,7 +24,6 @@
25 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/ResultsModelInterface.h24 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/ResultsModelInterface.h
26 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/PreviewModelInterface.h25 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/PreviewModelInterface.h
27 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/PreviewWidgetModelInterface.h26 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/PreviewWidgetModelInterface.h
28 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/PreviewStackInterface.h
29 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/ScopeInterface.h27 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/ScopeInterface.h
30 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/ScopesInterface.h28 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/ScopesInterface.h
31 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/SettingsModelInterface.h29 ${CMAKE_SOURCE_DIR}/include/unity/shell/scopes/SettingsModelInterface.h
3230
=== removed file 'test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockPreviewStack.cpp'
--- test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockPreviewStack.cpp 2014-05-19 11:45:10 +0000
+++ test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockPreviewStack.cpp 1970-01-01 00:00:00 +0000
@@ -1,63 +0,0 @@
1/*
2 * Copyright (C) 2014 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17// self
18#include "MockPreviewStack.h"
19
20// local
21#include "MockPreviewModel.h"
22
23MockPreviewStack::MockPreviewStack(QObject* parent)
24 : unity::shell::scopes::PreviewStackInterface(parent)
25{
26 m_previews << new MockPreviewModel(this);
27}
28
29void MockPreviewStack::setWidgetColumnCount(int columnCount)
30{
31 if (columnCount != 1) {
32 qFatal("MockPreviewStack::setWidgetColumnCount != 1 not implemented");
33 }
34}
35
36int MockPreviewStack::widgetColumnCount() const
37{
38 return 1;
39}
40
41int MockPreviewStack::rowCount(const QModelIndex&) const
42{
43 return m_previews.size();
44}
45
46unity::shell::scopes::PreviewModelInterface* MockPreviewStack::getPreviewModel(int index) const
47{
48 if (index >= m_previews.size()) {
49 return nullptr;
50 }
51
52 return m_previews.at(index);
53}
54
55QVariant MockPreviewStack::data(const QModelIndex& index, int role) const
56{
57 switch (role) {
58 case RolePreviewModel:
59 return QVariant::fromValue(m_previews.at(index.row()));
60 default:
61 return QVariant();
62 }
63}
640
=== removed file 'test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockPreviewStack.h'
--- test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockPreviewStack.h 2014-05-19 11:45:10 +0000
+++ test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockPreviewStack.h 1970-01-01 00:00:00 +0000
@@ -1,47 +0,0 @@
1/*
2 * Copyright (C) 2014 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17
18#ifndef MOCKPREVIEWSTACK_H
19#define MOCKPREVIEWSTACK_H
20
21#include <unity/shell/scopes/PreviewStackInterface.h>
22
23#include <QSharedPointer>
24#include <QVariantMap>
25
26class MockPreviewModel;
27
28class MockPreviewStack : public unity::shell::scopes::PreviewStackInterface
29{
30 Q_OBJECT
31
32public:
33 explicit MockPreviewStack (QObject* parent = 0);
34
35 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
36 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
37
38 Q_INVOKABLE unity::shell::scopes::PreviewModelInterface* getPreviewModel(int index) const override;
39
40 void setWidgetColumnCount(int columnCount) override;
41 int widgetColumnCount() const override;
42
43private:
44 QList<MockPreviewModel*> m_previews;
45};
46
47#endif
480
=== modified file 'test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.cpp'
--- test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.cpp 2015-10-05 12:54:22 +0000
+++ test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.cpp 2016-02-18 15:46:52 +0000
@@ -16,7 +16,7 @@
1616
17#include "MockScope.h"17#include "MockScope.h"
18#include "MockCategories.h"18#include "MockCategories.h"
19#include "MockPreviewStack.h"19#include "MockPreviewModel.h"
20#include "MockDepartment.h"20#include "MockDepartment.h"
21#include "MockSettingsModel.h"21#include "MockSettingsModel.h"
2222
@@ -77,6 +77,10 @@
77 return m_searching;77 return m_searching;
78}78}
7979
80bool MockScope::activationInProgress() const {
81 return false;
82}
83
80unity::shell::scopes::CategoriesInterface* MockScope::categories() const {84unity::shell::scopes::CategoriesInterface* MockScope::categories() const {
81 return m_categories;85 return m_categories;
82}86}
@@ -172,14 +176,14 @@
172 Q_UNUSED(actionId);176 Q_UNUSED(actionId);
173}177}
174178
175unity::shell::scopes::PreviewStackInterface* MockScope::preview(QVariant const& result, QString const& categoryId)179unity::shell::scopes::PreviewModelInterface* MockScope::preview(QVariant const& result, QString const& categoryId)
176{180{
177 Q_UNUSED(result);181 Q_UNUSED(result);
178 Q_UNUSED(categoryId);182 Q_UNUSED(categoryId);
179183
180 // This probably leaks, do we don't care184 // This probably leaks, do we don't care
181 // it's a test after all185 // it's a test after all
182 return new MockPreviewStack;186 return new MockPreviewModel;
183}187}
184188
185unity::shell::scopes::NavigationInterface* MockScope::getNavigation(QString const& navigationId)189unity::shell::scopes::NavigationInterface* MockScope::getNavigation(QString const& navigationId)
186190
=== modified file 'test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.h'
--- test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.h 2015-10-05 12:54:22 +0000
+++ test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.h 2016-02-18 15:46:52 +0000
@@ -36,6 +36,7 @@
36 bool favorite() const override;36 bool favorite() const override;
37 QString shortcut() const override;37 QString shortcut() const override;
38 bool searchInProgress() const override;38 bool searchInProgress() const override;
39 bool activationInProgress() const override;
39 unity::shell::scopes::CategoriesInterface* categories() const override;40 unity::shell::scopes::CategoriesInterface* categories() const override;
40 unity::shell::scopes::SettingsModelInterface* settings() const override;41 unity::shell::scopes::SettingsModelInterface* settings() const override;
41 QString searchQuery() const override;42 QString searchQuery() const override;
@@ -59,7 +60,7 @@
5960
60 Q_INVOKABLE void activate(QVariant const& result, QString const& categoryId) override;61 Q_INVOKABLE void activate(QVariant const& result, QString const& categoryId) override;
61 Q_INVOKABLE void activateAction(QVariant const& result, QString const& categoryId, QString const& actionId) override;62 Q_INVOKABLE void activateAction(QVariant const& result, QString const& categoryId, QString const& actionId) override;
62 Q_INVOKABLE unity::shell::scopes::PreviewStackInterface* preview(QVariant const& result, QString const& categoryId) override;63 Q_INVOKABLE unity::shell::scopes::PreviewModelInterface* preview(QVariant const& result, QString const& categoryId) override;
63 Q_INVOKABLE void cancelActivation() override;64 Q_INVOKABLE void cancelActivation() override;
64 Q_INVOKABLE void closeScope(unity::shell::scopes::ScopeInterface* scope) override;65 Q_INVOKABLE void closeScope(unity::shell::scopes::ScopeInterface* scope) override;
65 Q_INVOKABLE unity::shell::scopes::NavigationInterface* getNavigation(QString const& departmentId) override;66 Q_INVOKABLE unity::shell::scopes::NavigationInterface* getNavigation(QString const& departmentId) override;
6667
=== modified file 'test/qmltest/mocks/plugins/Unity/Scopes/TestScopesPlugin.cpp'
--- test/qmltest/mocks/plugins/Unity/Scopes/TestScopesPlugin.cpp 2014-07-25 15:17:40 +0000
+++ test/qmltest/mocks/plugins/Unity/Scopes/TestScopesPlugin.cpp 2016-02-18 15:46:52 +0000
@@ -24,7 +24,6 @@
24#include "ResultsModelInterface.h"24#include "ResultsModelInterface.h"
25#include "PreviewModelInterface.h"25#include "PreviewModelInterface.h"
26#include "PreviewWidgetModelInterface.h"26#include "PreviewWidgetModelInterface.h"
27#include "PreviewStackInterface.h"
28#include "SettingsModelInterface.h"27#include "SettingsModelInterface.h"
29#include "Mocks/MockScopes.h"28#include "Mocks/MockScopes.h"
30#include "Mocks/MockScope.h"29#include "Mocks/MockScope.h"
@@ -36,8 +35,7 @@
36 qmlRegisterUncreatableType<unity::shell::scopes::CategoriesInterface>(uri, 0, 2, "Categories", "Can't create Categories object in QML. Get them from Scope instance.");35 qmlRegisterUncreatableType<unity::shell::scopes::CategoriesInterface>(uri, 0, 2, "Categories", "Can't create Categories object in QML. Get them from Scope instance.");
37 qmlRegisterUncreatableType<unity::shell::scopes::NavigationInterface>(uri, 0, 2, "Navigation", "Can't create Navigation object in QML. Get them from Scope instance.");36 qmlRegisterUncreatableType<unity::shell::scopes::NavigationInterface>(uri, 0, 2, "Navigation", "Can't create Navigation object in QML. Get them from Scope instance.");
38 qmlRegisterUncreatableType<unity::shell::scopes::ResultsModelInterface>(uri, 0, 2, "ResultsModel", "Can't create new ResultsModel in QML. Get them from Categories instance.");37 qmlRegisterUncreatableType<unity::shell::scopes::ResultsModelInterface>(uri, 0, 2, "ResultsModel", "Can't create new ResultsModel in QML. Get them from Categories instance.");
39 qmlRegisterUncreatableType<unity::shell::scopes::PreviewModelInterface>(uri, 0, 2, "PreviewModel", "Can't create new PreviewModel in QML. Get them from PreviewStack instance.");38 qmlRegisterUncreatableType<unity::shell::scopes::PreviewModelInterface>(uri, 0, 2, "PreviewModel", "Can't create new PreviewModel in QML. Get them from Scope instance.");
40 qmlRegisterUncreatableType<unity::shell::scopes::PreviewWidgetModelInterface>(uri, 0, 2, "PreviewWidgetModel", "Can't create new PreviewWidgetModel in QML. Get them from PreviewModel instance.");39 qmlRegisterUncreatableType<unity::shell::scopes::PreviewWidgetModelInterface>(uri, 0, 2, "PreviewWidgetModel", "Can't create new PreviewWidgetModel in QML. Get them from PreviewModel instance.");
41 qmlRegisterUncreatableType<unity::shell::scopes::PreviewStackInterface>(uri, 0, 2, "PreviewStack", "Can't create new PreviewStack in QML. Get them from Scope instance.");
42 qmlRegisterUncreatableType<unity::shell::scopes::SettingsModelInterface>(uri, 0, 2, "Settings", "Can't create new Settings in QML. Get them from Scope instance.");40 qmlRegisterUncreatableType<unity::shell::scopes::SettingsModelInterface>(uri, 0, 2, "Settings", "Can't create new Settings in QML. Get them from Scope instance.");
43}41}
4442
=== modified file 'test/qmltest/unity/shell/scopes/tst_Scopes.qml'
--- test/qmltest/unity/shell/scopes/tst_Scopes.qml 2015-10-09 08:30:31 +0000
+++ test/qmltest/unity/shell/scopes/tst_Scopes.qml 2016-02-18 15:46:52 +0000
@@ -343,72 +343,11 @@
343 }343 }
344344
345 Verifier {345 Verifier {
346 id: previewStackVerifier
347
348 Repeater {
349 id: previewStackRepeater
350 model: preview
351 delegate: Item {
352 property var roles: model
353 }
354 }
355
356 function test_previewStack_data() {
357 return [
358 { tag: "PreviewStack[object]", type: "object" },
359 { tag: "PreviewStack[PreviewStackInterface]", type: "unity::shell::scopes::PreviewStackInterface" },
360 ];
361 }
362
363 function test_previewStack(data) {
364 object = previewStackRepeater.model;
365 name = "PreviewStack";
366 verifyData(data);
367 }
368
369 function test_previewStack_roles_data() {
370 return [
371 { tag: "Model.roles[previewModel]", role: "previewModel", type: "object" }
372 ];
373 }
374
375 function test_previewStack_roles(data) {
376 object = previewStackRepeater.itemAt(0).roles;
377 name = "PreviewStack";
378 verifyData(data);
379 }
380
381 function test_previewStack_properties_data() {
382 return [
383 { tag: "Item.properties[widgetColumnCount]", constant: "widgetColumnCount", type: "number" }
384 ];
385 }
386
387 function test_previewStack_properties(data) {
388 object = previewStackRepeater.model;
389 name = "PreviewStack";
390 verifyData(data);
391 }
392
393 function test_previewStack_methods_data() {
394 return [
395 { tag: "Model.methods[get]", method: "getPreviewModel" }
396 ];
397 }
398
399 function test_previewStack_methods(data) {
400 object = previewStackRepeater.model;
401 name = "PreviewStack"
402 verifyData(data);
403 }
404 }
405
406 Verifier {
407 id: previewModelVerifier346 id: previewModelVerifier
408347
409 Repeater {348 Repeater {
410 id: previewModelRepeater349 id: previewModelRepeater
411 model: preview.getPreviewModel(0)350 model: preview
412 delegate: Item {351 delegate: Item {
413 property var roles: model352 property var roles: model
414 property var columnModel: model.columnModel353 property var columnModel: model.columnModel

Subscribers

People subscribed via source and target branches

to all changes: