Merge lp:~unity-team/unity8/scopes-mocks-v2 into lp:unity8

Proposed by Michal Hruby
Status: Merged
Approved by: Michał Sawicz
Approved revision: 1015
Merged at revision: 1024
Proposed branch: lp:~unity-team/unity8/scopes-mocks-v2
Merge into: lp:unity8
Diff against target: 214 lines (+60/-26)
5 files modified
debian/control (+1/-1)
tests/mocks/Unity/CMakeLists.txt (+1/-1)
tests/mocks/Unity/fake_categories.cpp (+4/-0)
tests/mocks/Unity/fake_scope.cpp (+52/-24)
tests/mocks/Unity/fake_scope.h (+2/-0)
To merge this branch: bzr merge lp:~unity-team/unity8/scopes-mocks-v2
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+225940@code.launchpad.net

Commit message

Fix FTBFS when using latest unity-api.

Description of the change

Fix FTBFS when using latest unity-api.

 * Are there any related MPs required for this MP to build/function as expected? Please list.

https://code.launchpad.net/~mhr3/unity-api/expansion-queries/+merge/225938 + its prereq branch

 * Did you perform an exploratory manual test run of your code change and any related functionality?

Yes, compiles again.

 * Did you make sure that your branch does not contain spurious tags?

Yes.

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

No, trivial change.

 * If you changed the UI, has there been a design review?

N/A

To post a comment you must log in.
1014. By Michal Hruby

Consolidate code style of the scope mock

1015. By Michal Hruby

Added missing case

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

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes.

 * Did CI run pass? If not, please explain why.
New dep unavailable.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2014-07-03 14:47:28 +0000
3+++ debian/control 2014-07-08 11:05:16 +0000
4@@ -19,7 +19,7 @@
5 libpulse-dev,
6 libqmenumodel-dev (>= 0.2.7),
7 libqt5xmlpatterns5-dev,
8- libunity-api-dev (>= 7.83),
9+ libunity-api-dev (>= 7.85),
10 libunity-mir-dev,
11 libusermetricsoutput1-dev,
12 libxcb1-dev,
13
14=== modified file 'tests/mocks/Unity/CMakeLists.txt'
15--- tests/mocks/Unity/CMakeLists.txt 2014-06-02 08:01:57 +0000
16+++ tests/mocks/Unity/CMakeLists.txt 2014-07-08 11:05:16 +0000
17@@ -6,7 +6,7 @@
18 pkg_search_module(DEE dee-1.0 REQUIRED)
19 pkg_search_module(GOBJECT gobject-2.0 REQUIRED)
20 pkg_search_module(DEEQT libdee-qt5 REQUIRED)
21-pkg_check_modules(SCOPES_API REQUIRED unity-shell-scopes=1)
22+pkg_check_modules(SCOPES_API REQUIRED unity-shell-scopes=2)
23
24 include_directories(
25 ${CMAKE_CURRENT_BINARY_DIR}
26
27=== modified file 'tests/mocks/Unity/fake_categories.cpp'
28--- tests/mocks/Unity/fake_categories.cpp 2014-06-27 07:59:08 +0000
29+++ tests/mocks/Unity/fake_categories.cpp 2014-07-08 11:05:16 +0000
30@@ -116,6 +116,8 @@
31 map["title"] = "HOLA";
32 return map;
33 }
34+ case RoleHeaderLink:
35+ return QString();
36 case RoleResults:
37 return QVariant();
38 case RoleCount:
39@@ -163,6 +165,8 @@
40 map["subtitle"] = "HOLA";
41 return map;
42 }
43+ case RoleHeaderLink:
44+ return QString();
45 case RoleResults:
46 return QVariant::fromValue(resultsModel);
47 case RoleCount:
48
49=== modified file 'tests/mocks/Unity/fake_scope.cpp'
50--- tests/mocks/Unity/fake_scope.cpp 2014-06-27 07:58:48 +0000
51+++ tests/mocks/Unity/fake_scope.cpp 2014-07-08 11:05:16 +0000
52@@ -35,87 +35,110 @@
53 {
54 }
55
56-QString Scope::id() const {
57+QString Scope::id() const
58+{
59 return m_id;
60 }
61
62-QString Scope::name() const {
63+QString Scope::name() const
64+{
65 return m_name;
66 }
67
68-QString Scope::searchQuery() const {
69+QString Scope::searchQuery() const
70+{
71 return m_searchQuery;
72 }
73
74-QString Scope::iconHint() const {
75+QString Scope::iconHint() const
76+{
77 return m_iconHint;
78 }
79
80-QString Scope::description() const {
81+QString Scope::description() const
82+{
83 return m_description;
84 }
85
86-QString Scope::searchHint() const {
87- return QString("");
88-}
89-
90-QString Scope::shortcut() const {
91- return QString("");
92-}
93-
94-bool Scope::searchInProgress() const {
95+QString Scope::searchHint() const
96+{
97+ return QString("");
98+}
99+
100+QString Scope::shortcut() const
101+{
102+ return QString("");
103+}
104+
105+bool Scope::searchInProgress() const
106+{
107 return m_searching;
108 }
109
110-unity::shell::scopes::CategoriesInterface* Scope::categories() const {
111+unity::shell::scopes::CategoriesInterface* Scope::categories() const
112+{
113 return m_categories;
114 }
115
116-QString Scope::noResultsHint() const {
117+unity::shell::scopes::SettingsModelInterface* Scope::settings() const
118+{
119+ return nullptr;
120+}
121+
122+QString Scope::noResultsHint() const
123+{
124 return m_noResultsHint;
125 }
126
127-QString Scope::formFactor() const {
128+QString Scope::formFactor() const
129+{
130 return m_formFactor;
131 }
132
133-bool Scope::visible() const {
134+bool Scope::visible() const
135+{
136 return m_visible;
137 }
138
139-bool Scope::isActive() const {
140+bool Scope::isActive() const
141+{
142 return m_isActive;
143 }
144
145-void Scope::setSearchQuery(const QString &str) {
146+void Scope::setSearchQuery(const QString &str)
147+{
148 if (str != m_searchQuery) {
149 m_searchQuery = str;
150 Q_EMIT searchQueryChanged();
151 }
152 }
153
154-void Scope::setFormFactor(const QString &str) {
155+void Scope::setFormFactor(const QString &str)
156+{
157 if (str != m_formFactor) {
158 m_formFactor = str;
159 Q_EMIT formFactorChanged();
160 }
161 }
162
163-void Scope::setActive(const bool active) {
164+void Scope::setActive(const bool active)
165+{
166 if (active != m_isActive) {
167 m_isActive = active;
168 Q_EMIT isActiveChanged();
169 }
170 }
171
172-void Scope::setSearchInProgress(const bool inProg) {
173+void Scope::setSearchInProgress(const bool inProg)
174+{
175 if (inProg != m_searching) {
176 m_searching = inProg;
177 Q_EMIT searchInProgressChanged();
178 }
179 }
180
181-void Scope::setNoResultsHint(const QString& str) {
182+void Scope::setNoResultsHint(const QString& str)
183+{
184 if (str != m_noResultsHint) {
185 m_noResultsHint = str;
186 Q_EMIT noResultsHintChanged();
187@@ -182,3 +205,8 @@
188 m_currentDeparment = id;
189 Q_EMIT currentDepartmentIdChanged();
190 }
191+
192+void Scope::performQuery(const QString& query)
193+{
194+ Q_UNUSED(query);
195+}
196
197=== modified file 'tests/mocks/Unity/fake_scope.h'
198--- tests/mocks/Unity/fake_scope.h 2014-06-27 07:58:48 +0000
199+++ tests/mocks/Unity/fake_scope.h 2014-07-08 11:05:16 +0000
200@@ -46,6 +46,7 @@
201 QString noResultsHint() const override;
202 QString formFactor() const override;
203 bool isActive() const override;
204+ unity::shell::scopes::SettingsModelInterface* settings() const override;
205
206 /* setters */
207 void setSearchQuery(const QString& search_query) override;
208@@ -63,6 +64,7 @@
209 bool hasDepartments() const override;
210 Q_INVOKABLE unity::shell::scopes::DepartmentInterface* getDepartment(const QString& id) override;
211 Q_INVOKABLE void loadDepartment(const QString& id) override;
212+ Q_INVOKABLE void performQuery(const QString& query) override;
213
214 QVariantMap customizations() const override;
215

Subscribers

People subscribed via source and target branches