Merge lp:~unity-team/unity-api/scope-customizations into lp:unity-api

Proposed by Michal Hruby
Status: Merged
Approved by: Michał Sawicz
Approved revision: 141
Merged at revision: 140
Proposed branch: lp:~unity-team/unity-api/scope-customizations
Merge into: lp:unity-api
Diff against target: 101 lines (+22/-1)
5 files modified
debian/changelog (+6/-0)
include/unity/shell/scopes/ScopeInterface.h (+8/-0)
test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.cpp (+4/-0)
test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.h (+2/-0)
test/qmltest/unity/shell/scopes/tst_Scopes.qml (+2/-1)
To merge this branch: bzr merge lp:~unity-team/unity-api/scope-customizations
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+223893@code.launchpad.net

Commit message

Added customizations property to ScopeInterface.

Description of the change

Added customizations property to ScopeInterface.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
141. By Michal Hruby

Act on review comments

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Yup.

review: Approve
142. By Michal Hruby

Revert the version bump, cause it's was not synced with debian anyway

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-06-16 14:45:10 +0000
3+++ debian/changelog 2014-06-26 08:20:35 +0000
4@@ -1,3 +1,9 @@
5+unity-api (7.83-0ubuntu1) UNRELEASED; urgency=medium
6+
7+ * Added customizations property to ScopeInterface.
8+
9+ -- Michal Hruby <michal.hruby@canonical.com> Thu, 19 Jun 2014 17:17:08 +0100
10+
11 unity-api (7.82+14.10.20140616-0ubuntu1) utopic; urgency=medium
12
13 [ Albert Astals Cid ]
14
15=== modified file 'include/unity/shell/scopes/ScopeInterface.h'
16--- include/unity/shell/scopes/ScopeInterface.h 2014-05-29 10:24:53 +0000
17+++ include/unity/shell/scopes/ScopeInterface.h 2014-06-26 08:20:35 +0000
18@@ -20,6 +20,7 @@
19 #include <unity/SymbolExport.h>
20
21 #include <QObject>
22+#include <QVariantMap>
23
24 namespace unity
25 {
26@@ -120,6 +121,11 @@
27 */
28 Q_PROPERTY(bool hasDepartments READ hasDepartments NOTIFY hasDepartmentsChanged)
29
30+ /**
31+ * @brief VariantMap with customization properties
32+ */
33+ Q_PROPERTY(QVariantMap customizations READ customizations NOTIFY customizationsChanged)
34+
35 protected:
36 /// @cond
37 explicit ScopeInterface(QObject* parent = 0) : QObject(parent) { }
38@@ -143,6 +149,7 @@
39 virtual bool isActive() const = 0;
40 virtual QString currentDepartmentId() const = 0;
41 virtual bool hasDepartments() const = 0;
42+ virtual QVariantMap customizations() const = 0;
43
44 /* setters */
45 virtual void setSearchQuery(const QString& search_query) = 0;
46@@ -203,6 +210,7 @@
47 void isActiveChanged();
48 void hasDepartmentsChanged();
49 void currentDepartmentIdChanged();
50+ void customizationsChanged();
51 // @endcond
52
53 // signals triggered by activate(..) or preview(..) requests.
54
55=== modified file 'test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.cpp'
56--- test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.cpp 2014-05-29 10:24:53 +0000
57+++ test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.cpp 2014-06-26 08:20:35 +0000
58@@ -95,6 +95,10 @@
59 return m_hasDepartments;
60 }
61
62+QVariantMap MockScope::customizations() const {
63+ return m_customizations;
64+}
65+
66 void MockScope::setName(const QString &str) {
67 if (str != m_name) {
68 m_name = str;
69
70=== modified file 'test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.h'
71--- test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.h 2014-05-29 10:24:53 +0000
72+++ test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScope.h 2014-06-26 08:20:35 +0000
73@@ -43,6 +43,7 @@
74 bool isActive() const override;
75 bool hasDepartments() const override;
76 QString currentDepartmentId() const override;
77+ QVariantMap customizations() const override;
78
79 /* setters */
80 void setName(const QString& name);
81@@ -71,6 +72,7 @@
82 bool m_searching;
83 bool m_isActive;
84 bool m_hasDepartments;
85+ QVariantMap m_customizations;
86
87 QString m_previewRendererName;
88
89
90=== modified file 'test/qmltest/unity/shell/scopes/tst_Scopes.qml'
91--- test/qmltest/unity/shell/scopes/tst_Scopes.qml 2014-05-29 12:25:47 +0000
92+++ test/qmltest/unity/shell/scopes/tst_Scopes.qml 2014-06-26 08:20:35 +0000
93@@ -126,7 +126,8 @@
94 { tag: "Item.properties[formFactor]", constant: "formFactor", type: "string" },
95 { tag: "Item.properties[isActive]", constant: "isActive", type: "boolean" },
96 { tag: "Item.properties[currentDepartmentId]", constant: "currentDepartmentId", type: "string" },
97- { tag: "Item.properties[hasDepartments]", constant: "hasDepartments", type: "boolean" }
98+ { tag: "Item.properties[hasDepartments]", constant: "hasDepartments", type: "boolean" },
99+ { tag: "Item.properties[customizations]", constant: "customizations", type: "object" }
100 ];
101 }
102

Subscribers

People subscribed via source and target branches

to all changes: