Merge lp:~aacid/unity-api/setMoveFavorite into lp:unity-api

Proposed by Albert Astals Cid
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 162
Merged at revision: 164
Proposed branch: lp:~aacid/unity-api/setMoveFavorite
Merge into: lp:unity-api
Diff against target: 79 lines (+30/-1)
5 files modified
debian/changelog (+6/-0)
include/unity/shell/scopes/CMakeLists.txt (+1/-1)
include/unity/shell/scopes/ScopesInterface.h (+10/-0)
test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScopes.cpp (+10/-0)
test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScopes.h (+3/-0)
To merge this branch: bzr merge lp:~aacid/unity-api/setMoveFavorite
Reviewer Review Type Date Requested Status
Nick Dedekind (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Paweł Stołowski Approve
Review via email: mp+238936@code.launchpad.net

Commit message

API for setFavorite/moveFavoriteTo

To post a comment you must log in.
Paweł Stołowski (stolowski) wrote :

Looks good, but please also bump version.

review: Needs Fixing
lp:~aacid/unity-api/setMoveFavorite updated
157. By Albert Astals Cid on 2014-10-20

Increase version

Nick Dedekind (nick-dedekind) wrote :

Text conflict in debian/changelog

review: Needs Fixing
lp:~aacid/unity-api/setMoveFavorite updated
158. By Albert Astals Cid on 2014-10-22

Merge

159. By Albert Astals Cid on 2014-10-22

changelog

Albert Astals Cid (aacid) wrote :

Conflict fixed.

Nick Dedekind (nick-dedekind) wrote :

Looks fine.

review: Approve
Nick Dedekind (nick-dedekind) wrote :

Woops. de-const those methods please.

review: Needs Fixing
lp:~aacid/unity-api/setMoveFavorite updated
160. By Albert Astals Cid on 2014-10-22

not const!

Paweł Stołowski (stolowski) wrote :

+1

review: Approve
lp:~aacid/unity-api/setMoveFavorite updated
161. By Albert Astals Cid on 2014-10-22

I said no const

lp:~aacid/unity-api/setMoveFavorite updated
162. By Albert Astals Cid on 2014-10-22

For the third time i said no const!

review: Approve
lp:~aacid/unity-api/setMoveFavorite updated
163. By Albert Astals Cid on 2014-11-05

Merge

Michał Sawicz (saviq) wrote :

Please run http://people.canonical.com/~msawicz/unity8/strip-tags.py on this branch and any local checkout.

Albert Astals Cid (aacid) wrote :

> Please run http://people.canonical.com/~msawicz/unity8/strip-tags.py on this
> branch and any local checkout.

Done

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-11-04 14:42:57 +0000
3+++ debian/changelog 2014-11-05 08:33:25 +0000
4@@ -1,3 +1,9 @@
5+unity-api (7.94-0ubuntu1) UNRELEASED; urgency=medium
6+
7+ * Add setFavorite/moveFavoriteTo
8+
9+ -- Albert Astals Cid <albert.astals@canonical.com> Mon, 20 Oct 2014 16:43:28 -0400
10+
11 unity-api (7.93+15.04.20141104-0ubuntu1) vivid; urgency=medium
12
13 [ Michael Zanetti ]
14
15=== modified file 'include/unity/shell/scopes/CMakeLists.txt'
16--- include/unity/shell/scopes/CMakeLists.txt 2014-07-25 14:08:42 +0000
17+++ include/unity/shell/scopes/CMakeLists.txt 2014-11-05 08:33:25 +0000
18@@ -7,7 +7,7 @@
19
20 set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)
21
22-set(VERSION 4)
23+set(VERSION 5)
24 set(PKGCONFIG_NAME "unity-shell-scopes")
25 set(PKGCONFIG_DESCRIPTION "Unity shell Scopes APIs")
26 set(PKGCONFIG_REQUIRES "Qt5Core")
27
28=== modified file 'include/unity/shell/scopes/ScopesInterface.h'
29--- include/unity/shell/scopes/ScopesInterface.h 2014-08-01 13:09:00 +0000
30+++ include/unity/shell/scopes/ScopesInterface.h 2014-11-05 08:33:25 +0000
31@@ -88,6 +88,16 @@
32 */
33 Q_INVOKABLE virtual unity::shell::scopes::ScopeInterface* getScope(QString const& scopeId) const = 0;
34
35+ /**
36+ * @brief Set the favorite bit of the given scope.
37+ */
38+ Q_INVOKABLE virtual void setFavorite(QString const& scopeId, bool favorite) = 0;
39+
40+ /**
41+ * @brief Move the given favorite scope to the given index.
42+ */
43+ Q_INVOKABLE virtual void moveFavoriteTo(QString const& scopeId, int index) = 0;
44+
45 // @cond
46 virtual bool loaded() const = 0;
47 virtual int count() const = 0;
48
49=== modified file 'test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScopes.cpp'
50--- test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScopes.cpp 2014-08-01 13:09:00 +0000
51+++ test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScopes.cpp 2014-11-05 08:33:25 +0000
52@@ -82,3 +82,13 @@
53 // Unimplemented
54 return nullptr;
55 }
56+
57+void MockScopes::setFavorite(QString const&, bool)
58+{
59+ // Unimplemented
60+}
61+
62+void MockScopes::moveFavoriteTo(QString const&, int)
63+{
64+ // Unimplemented
65+}
66
67=== modified file 'test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScopes.h'
68--- test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScopes.h 2014-08-01 13:09:00 +0000
69+++ test/qmltest/mocks/plugins/Unity/Scopes/Mocks/MockScopes.h 2014-11-05 08:33:25 +0000
70@@ -43,6 +43,9 @@
71 int count() const override;
72 unity::shell::scopes::ScopeInterface* overviewScope() const override;
73
74+ void setFavorite(QString const& scopeId, bool favorite) override;
75+ void moveFavoriteTo(QString const& scopeId, int index) override;
76+
77 private:
78 QList<MockScope*> m_scopes;
79 QHash<int, QByteArray> m_roles;

Subscribers

People subscribed via source and target branches

to all changes: