Merge lp:~pete-woods/hud/no-suggestions-for-legacy-queries into lp:hud/14.04

Proposed by Pete Woods
Status: Merged
Approved by: Antti Kaijanmäki
Approved revision: 377
Merged at revision: 377
Proposed branch: lp:~pete-woods/hud/no-suggestions-for-legacy-queries
Merge into: lp:hud/14.04
Prerequisite: lp:~pete-woods/hud/gtkdoc-fix-behaviour-change
Diff against target: 500 lines (+122/-49)
17 files modified
debian/changelog (+8/-0)
service/Factory.cpp (+3/-2)
service/Factory.h (+2/-1)
service/HudServiceImpl.cpp (+7/-4)
service/HudServiceImpl.h (+2/-1)
service/ItemStore.cpp (+6/-1)
service/ItemStore.h (+3/-1)
service/Query.h (+5/-0)
service/QueryImpl.cpp (+7/-6)
service/QueryImpl.h (+5/-3)
service/Window.h (+3/-1)
service/WindowImpl.cpp (+3/-2)
service/WindowImpl.h (+2/-1)
tests/unit/service/Mocks.h (+3/-2)
tests/unit/service/TestHudService.cpp (+17/-13)
tests/unit/service/TestItemStore.cpp (+32/-2)
tests/unit/service/TestQuery.cpp (+14/-9)
To merge this branch: bzr merge lp:~pete-woods/hud/no-suggestions-for-legacy-queries
Reviewer Review Type Date Requested Status
Antti Kaijanmäki (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+207949@code.launchpad.net

This proposal supersedes a proposal from 2014-02-18.

Commit message

Make legacy queries return no results with an empty search string

Description of the change

* Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)
  * Yes
 * Did you build your software in a clean sbuild/pbuilder chroot or ppa?
  * Yes
 * Did you build your software in a clean sbuild/pbuilder armhf chroot or ppa?
  * Yes
 * Has your component "TestPlan” been executed successfully on emulator, N4?
  * Yes
 * Has a 5 minute exploratory testing run been executed on N4?
  * Yes
 * If you changed the packaging (debian), did you subscribe a core-dev to this MP?
  * N/A
 * If you changed the UI, did you subscribe the design-reviewers to this MP?
  * No change
 * What components might get impacted by your changes?
  * Unity7
  * Unity8
 * Have you requested review by the teams of these owning components?
  * Yes

Check List:
https://wiki.ubuntu.com/Process/Merges/Checklists/hud

Test Plan:
https://wiki.ubuntu.com/Process/Merges/TestPlan/hud

Silo:
https://launchpad.net/~ci-train-ppa-service/+archive/landing-002/

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
375. By Pete Woods

Change GTK documentation so that it builds with the new glib version Fixes: 1287580

376. By PS Jenkins bot

Releasing 13.10.1+14.04.20140304-0ubuntu1

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

LGTM.

Waiting for silo.

Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

 * Are any changes against your component pending/needed to land the MP under review in a functional state and are those called out explicitly by the submitter?
Yes.

 * Did you do exploratory testing related to the component you own with the MP changeset included?
Yes.

 * Has the submitter requested review by all the relevant teams/reviewres?
Yes.

 * If you are the reviewer owning the component the MP is against, have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
Yes.

review: Approve

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-02-18 14:29:31 +0000
3+++ debian/changelog 2014-03-14 14:07:05 +0000
4@@ -1,3 +1,11 @@
5+hud (13.10.1+14.04.20140304-0ubuntu1) trusty; urgency=low
6+
7+ [ Pete Woods ]
8+ * Change GTK documentation so that it builds with the new glib version
9+ (LP: #1287580)
10+
11+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 04 Mar 2014 09:58:04 +0000
12+
13 hud (13.10.1+14.04.20140218.2-0ubuntu1) trusty; urgency=low
14
15 [ Pete Woods ]
16
17=== modified file 'service/Factory.cpp'
18--- service/Factory.cpp 2014-02-15 10:23:45 +0000
19+++ service/Factory.cpp 2014-03-14 14:07:05 +0000
20@@ -88,9 +88,10 @@
21 return m_sessionBus;
22 }
23
24-Query::Ptr Factory::newQuery(const QString &query, const QString &sender) {
25+Query::Ptr Factory::newQuery(const QString &query, const QString &sender,
26+ Query::EmptyBehaviour emptyBehaviour) {
27 return Query::Ptr(
28- new QueryImpl(m_queryCounter++, query, sender,
29+ new QueryImpl(m_queryCounter++, query, sender, emptyBehaviour,
30 *singletonHudService(), singletonApplicationList(),
31 singletonVoice(), sessionBus()));
32 }
33
34=== modified file 'service/Factory.h'
35--- service/Factory.h 2014-02-15 10:23:45 +0000
36+++ service/Factory.h 2014-03-14 14:07:05 +0000
37@@ -60,7 +60,8 @@
38
39 virtual QSharedPointer<ComCanonicalAppMenuRegistrarInterface> singletonAppmenu();
40
41- virtual Query::Ptr newQuery(const QString &query, const QString &sender);
42+ virtual Query::Ptr newQuery(const QString &query, const QString &sender,
43+ Query::EmptyBehaviour emptyBehaviour);
44
45 virtual ApplicationList::Ptr singletonApplicationList();
46
47
48=== modified file 'service/HudServiceImpl.cpp'
49--- service/HudServiceImpl.cpp 2013-12-17 16:37:55 +0000
50+++ service/HudServiceImpl.cpp 2014-03-14 14:07:05 +0000
51@@ -62,8 +62,8 @@
52 }
53
54 Query::Ptr HudServiceImpl::createQuery(const QString &query,
55- const QString &sender) {
56- Query::Ptr hudQuery(m_factory.newQuery(query, sender));
57+ const QString &sender, Query::EmptyBehaviour emptyBehaviour) {
58+ Query::Ptr hudQuery(m_factory.newQuery(query, sender, emptyBehaviour));
59 m_queries[hudQuery->path()] = hudQuery;
60
61 return hudQuery;
62@@ -73,7 +73,9 @@
63 QString &resultsName, QString &appstackName, int &modelRevision) {
64 QString sender(messageSender());
65
66- Query::Ptr hudQuery(createQuery(query, sender));
67+ Query::Ptr hudQuery(
68+ createQuery(query, sender,
69+ Query::EmptyBehaviour::SHOW_SUGGESTIONS));
70
71 resultsName = hudQuery->resultsModel();
72 appstackName = hudQuery->appstackModel();
73@@ -104,7 +106,8 @@
74
75 Query::Ptr query(m_legacyQueries[sender]);
76 if (query.isNull()) {
77- query = createQuery(queryString, sender);
78+ query = createQuery(queryString, sender,
79+ Query::EmptyBehaviour::NO_SUGGESTIONS);
80 m_legacyQueries[sender] = query;
81 } else {
82 query->UpdateQuery(queryString);
83
84=== modified file 'service/HudServiceImpl.h'
85--- service/HudServiceImpl.h 2013-12-17 16:37:55 +0000
86+++ service/HudServiceImpl.h 2014-03-14 14:07:05 +0000
87@@ -74,7 +74,8 @@
88 void CloseQuery(const QDBusVariant &querykey);
89
90 protected:
91- Query::Ptr createQuery(const QString &query, const QString &service);
92+ Query::Ptr createQuery(const QString &query, const QString &service,
93+ Query::EmptyBehaviour emptyBehaviour);
94
95 QScopedPointer<HudAdaptor> m_adaptor;
96
97
98=== modified file 'service/ItemStore.cpp'
99--- service/ItemStore.cpp 2014-02-15 10:23:45 +0000
100+++ service/ItemStore.cpp 2014-03-14 14:07:05 +0000
101@@ -150,10 +150,15 @@
102 return result;
103 }
104
105-void ItemStore::search(const QString &query, QList<Result> &results) {
106+void ItemStore::search(const QString &query,
107+ Query::EmptyBehaviour emptyBehaviour, QList<Result> &results) {
108 QStringMatcher stringMatcher(query, Qt::CaseInsensitive);
109
110 if (query.isEmpty()) {
111+ if (emptyBehaviour == Query::EmptyBehaviour::NO_SUGGESTIONS) {
112+ return;
113+ }
114+
115 QMap<unsigned int, DocumentID> tempResults;
116
117 for (auto it(m_items.constBegin()); it != m_items.constEnd(); ++it) {
118
119=== modified file 'service/ItemStore.h'
120--- service/ItemStore.h 2014-02-15 10:23:45 +0000
121+++ service/ItemStore.h 2014-03-14 14:07:05 +0000
122@@ -20,6 +20,7 @@
123 #define HUD_SERVICE_ITEMSTORE_H_
124
125 #include <service/Item.h>
126+#include <service/Query.h>
127 #include <service/Result.h>
128 #include <service/SearchSettings.h>
129 #include <service/UsageTracker.h>
130@@ -50,7 +51,8 @@
131
132 void indexMenu(const QMenu *menu);
133
134- void search(const QString &query, QList<Result> &results);
135+ void search(const QString &query, Query::EmptyBehaviour emptyBehaviour,
136+ QList<Result> &results);
137
138 void execute(unsigned long long commandId);
139
140
141=== modified file 'service/Query.h'
142--- service/Query.h 2013-11-18 09:37:43 +0000
143+++ service/Query.h 2014-03-14 14:07:05 +0000
144@@ -39,6 +39,11 @@
145 public:
146 typedef QSharedPointer<Query> Ptr;
147
148+ enum class EmptyBehaviour {
149+ SHOW_SUGGESTIONS,
150+ NO_SUGGESTIONS,
151+ };
152+
153 explicit Query(QObject *parent = 0);
154
155 virtual ~Query();
156
157=== modified file 'service/QueryImpl.cpp'
158--- service/QueryImpl.cpp 2013-12-20 14:44:11 +0000
159+++ service/QueryImpl.cpp 2014-03-14 14:07:05 +0000
160@@ -30,13 +30,14 @@
161 using namespace hud::service;
162
163 QueryImpl::QueryImpl(unsigned int id, const QString &query,
164- const QString &sender, HudService &service,
165- ApplicationList::Ptr applicationList, Voice::Ptr voice,
166- const QDBusConnection &connection, QObject *parent) :
167+ const QString &sender, EmptyBehaviour emptyBehaviour,
168+ HudService &service, ApplicationList::Ptr applicationList,
169+ Voice::Ptr voice, const QDBusConnection &connection, QObject *parent) :
170 Query(parent), m_adaptor(new QueryAdaptor(this)), m_connection(
171 connection), m_path(DBusTypes::queryPath(id)), m_service(
172- service), m_applicationList(applicationList), m_voice(voice), m_query(
173- query), m_serviceWatcher(sender, m_connection,
174+ service), m_emptyBehaviour(emptyBehaviour), m_applicationList(
175+ applicationList), m_voice(voice), m_query(query), m_serviceWatcher(
176+ sender, m_connection,
177 QDBusServiceWatcher::WatchForUnregistration) {
178
179 connect(&m_serviceWatcher, SIGNAL(serviceUnregistered(const QString &)),
180@@ -202,7 +203,7 @@
181 // Hold onto a token for the active window
182 updateToken(window);
183
184- m_windowToken->search(m_query, m_results);
185+ m_windowToken->search(m_query, m_emptyBehaviour, m_results);
186
187 notifyPropertyChanged("com.canonical.hud.query", "ToolbarItems");
188 }
189
190=== modified file 'service/QueryImpl.h'
191--- service/QueryImpl.h 2013-12-17 16:37:55 +0000
192+++ service/QueryImpl.h 2014-03-14 14:07:05 +0000
193@@ -43,9 +43,9 @@
194 Q_OBJECT
195 public:
196 QueryImpl(unsigned int id, const QString &query, const QString &sender,
197- HudService &service, ApplicationList::Ptr applicationList,
198- Voice::Ptr voice, const QDBusConnection &connection,
199- QObject *parent = 0);
200+ EmptyBehaviour emptyBehaviour, HudService &service,
201+ ApplicationList::Ptr applicationList, Voice::Ptr voice,
202+ const QDBusConnection &connection, QObject *parent = 0);
203
204 virtual ~QueryImpl();
205
206@@ -98,6 +98,8 @@
207
208 HudService &m_service;
209
210+ EmptyBehaviour m_emptyBehaviour;
211+
212 ApplicationList::Ptr m_applicationList;
213
214 Voice::Ptr m_voice;
215
216=== modified file 'service/Window.h'
217--- service/Window.h 2013-12-09 10:53:01 +0000
218+++ service/Window.h 2014-03-14 14:07:05 +0000
219@@ -19,6 +19,7 @@
220 #ifndef HUD_SERVICE_WINDOW_H_
221 #define HUD_SERVICE_WINDOW_H_
222
223+#include <service/Query.h>
224 #include <service/Result.h>
225 #include <service/WindowContext.h>
226
227@@ -35,7 +36,8 @@
228
229 virtual ~WindowToken();
230
231- virtual void search(const QString &query, QList<Result> &results) = 0;
232+ virtual void search(const QString &query,
233+ Query::EmptyBehaviour emptyBehaviour, QList<Result> &results) = 0;
234
235 virtual void execute(unsigned long long commandId) = 0;
236
237
238=== modified file 'service/WindowImpl.cpp'
239--- service/WindowImpl.cpp 2014-02-05 16:51:38 +0000
240+++ service/WindowImpl.cpp 2014-03-14 14:07:05 +0000
241@@ -45,8 +45,9 @@
242 return m_tokens;
243 }
244
245-void WindowTokenImpl::search(const QString &query, QList<Result> &results) {
246- m_items->search(query, results);
247+void WindowTokenImpl::search(const QString &query,
248+ Query::EmptyBehaviour emptyBehaviour, QList<Result> &results) {
249+ m_items->search(query, emptyBehaviour, results);
250 }
251
252 void WindowTokenImpl::execute(unsigned long long commandId) {
253
254=== modified file 'service/WindowImpl.h'
255--- service/WindowImpl.h 2013-12-20 13:19:01 +0000
256+++ service/WindowImpl.h 2014-03-14 14:07:05 +0000
257@@ -44,7 +44,8 @@
258
259 virtual ~WindowTokenImpl();
260
261- void search(const QString &query, QList<Result> &results) override;
262+ void search(const QString &query, Query::EmptyBehaviour emptyBehaviour,
263+ QList<Result> &results) override;
264
265 void execute(unsigned long long commandId) override;
266
267
268=== modified file 'tests/unit/service/Mocks.h'
269--- tests/unit/service/Mocks.h 2013-12-19 12:58:11 +0000
270+++ tests/unit/service/Mocks.h 2014-03-14 14:07:05 +0000
271@@ -34,7 +34,7 @@
272
273 MOCK_METHOD0(sessionBus, QDBusConnection());
274
275- MOCK_METHOD2(newQuery, Query::Ptr( const QString &, const QString &));
276+ MOCK_METHOD3(newQuery, Query::Ptr( const QString &, const QString &, Query::EmptyBehaviour));
277
278 MOCK_METHOD1(newApplication, Application::Ptr(const QString &));
279
280@@ -106,7 +106,8 @@
281
282 class MockWindowToken: public WindowToken {
283 public:
284- MOCK_METHOD2(search, void(const QString &, QList<Result> &));
285+ MOCK_METHOD3(search, void(const QString &,
286+ Query::EmptyBehaviour emptyBehaviour, QList<Result> &));
287
288 MOCK_METHOD1(execute, void(unsigned long long));
289
290
291=== modified file 'tests/unit/service/TestHudService.cpp'
292--- tests/unit/service/TestHudService.cpp 2013-11-21 09:20:54 +0000
293+++ tests/unit/service/TestHudService.cpp 2014-03-14 14:07:05 +0000
294@@ -53,7 +53,8 @@
295 };
296
297 TEST_F(TestHudService, OpenCloseQuery) {
298- HudServiceImpl hudService(factory, applicationList, dbus.sessionConnection());
299+ HudServiceImpl hudService(factory, applicationList,
300+ dbus.sessionConnection());
301
302 QDBusObjectPath queryPath("/path/query0");
303 QString resultsModel("com.canonical.hud.results0");
304@@ -63,7 +64,7 @@
305 ON_CALL(*query, resultsModel()).WillByDefault(Return(resultsModel));
306 ON_CALL(*query, appstackModel()).WillByDefault(Return(appstackModel));
307
308- EXPECT_CALL(factory, newQuery(QString("query text"), QString("local"))).Times(
309+ EXPECT_CALL(factory, newQuery(QString("query text"), QString("local"), Query::EmptyBehaviour::SHOW_SUGGESTIONS)).Times(
310 1).WillOnce(Return(query));
311
312 QString resultsName;
313@@ -83,7 +84,8 @@
314 }
315
316 TEST_F(TestHudService, CloseUnknownQuery) {
317- HudServiceImpl hudService(factory, applicationList, dbus.sessionConnection());
318+ HudServiceImpl hudService(factory, applicationList,
319+ dbus.sessionConnection());
320
321 QDBusObjectPath queryPath("/path/query0");
322
323@@ -93,7 +95,8 @@
324 }
325
326 TEST_F(TestHudService, CreateMultipleQueries) {
327- HudServiceImpl hudService(factory, applicationList, dbus.sessionConnection());
328+ HudServiceImpl hudService(factory, applicationList,
329+ dbus.sessionConnection());
330
331 QDBusObjectPath queryPath0("/path/query0");
332 QString resultsModel0("com.canonical.hud.results0");
333@@ -111,10 +114,10 @@
334 ON_CALL(*query1, resultsModel()).WillByDefault(Return(resultsModel1));
335 ON_CALL(*query1, appstackModel()).WillByDefault(Return(appstackModel1));
336
337- EXPECT_CALL(factory, newQuery(QString("query0"), QString("local"))).Times(1).WillOnce(
338- Return(query0));
339- EXPECT_CALL(factory, newQuery(QString("query1"), QString("local"))).Times(1).WillOnce(
340- Return(query1));
341+ EXPECT_CALL(factory, newQuery(QString("query0"), QString("local"), Query::EmptyBehaviour::SHOW_SUGGESTIONS)).Times(
342+ 1).WillOnce(Return(query0));
343+ EXPECT_CALL(factory, newQuery(QString("query1"), QString("local"), Query::EmptyBehaviour::SHOW_SUGGESTIONS)).Times(
344+ 1).WillOnce(Return(query1));
345
346 int modelRevision;
347 QString resultsName;
348@@ -153,7 +156,8 @@
349 ON_CALL(*applicationList, focusedApplication()).WillByDefault(
350 Return(application));
351
352- HudServiceImpl hudService(factory, applicationList, dbus.sessionConnection());
353+ HudServiceImpl hudService(factory, applicationList,
354+ dbus.sessionConnection());
355
356 QDBusObjectPath queryPath("/path/query0");
357 QList<Result> results;
358@@ -172,7 +176,7 @@
359 ON_CALL(*query, path()).WillByDefault(ReturnRef(queryPath));
360 ON_CALL(*query, results()).WillByDefault(ReturnRef(results));
361
362- EXPECT_CALL(factory, newQuery(QString("query text"), QString("local"))).Times(
363+ EXPECT_CALL(factory, newQuery(QString("query text"), QString("local"), Query::EmptyBehaviour::NO_SUGGESTIONS)).Times(
364 1).WillOnce(Return(query));
365
366 QList<Suggestion> suggestions;
367@@ -213,13 +217,13 @@
368
369 QSharedPointer<MockApplication> application(
370 new NiceMock<MockApplication>());
371- ON_CALL(*application, path()).WillByDefault(
372- ReturnRef(path));
373+ ON_CALL(*application, path()).WillByDefault(ReturnRef(path));
374
375 EXPECT_CALL(*applicationList, ensureApplication(QString("app-id"))).WillOnce(
376 Return(application));
377
378- HudServiceImpl hudService(factory, applicationList, dbus.sessionConnection());
379+ HudServiceImpl hudService(factory, applicationList,
380+ dbus.sessionConnection());
381
382 EXPECT_EQ(path, hudService.RegisterApplication("app-id"));
383 }
384
385=== modified file 'tests/unit/service/TestItemStore.cpp'
386--- tests/unit/service/TestItemStore.cpp 2014-02-17 09:58:27 +0000
387+++ tests/unit/service/TestItemStore.cpp 2014-03-14 14:07:05 +0000
388@@ -44,7 +44,7 @@
389 /* Test a set of strings */
390 string search(const QString &query) {
391 QList<Result> results;
392- store->search(query, results);
393+ store->search(query, Query::EmptyBehaviour::SHOW_SUGGESTIONS, results);
394
395 QString result;
396
397@@ -257,7 +257,7 @@
398 Return(3));
399
400 QList<Result> results;
401- store->search("", results);
402+ store->search("", Query::EmptyBehaviour::SHOW_SUGGESTIONS, results);
403 ASSERT_EQ(4, results.size());
404 EXPECT_EQ(QString("Three"), results.at(0).commandName());
405 EXPECT_EQ(QString("Four"), results.at(1).commandName());
406@@ -265,6 +265,36 @@
407 EXPECT_EQ(QString("Two"), results.at(3).commandName());
408 }
409
410+TEST_F(TestItemStore, BlankSearchNoSuggestions) {
411+ QMenu root;
412+
413+ QMenu file("&File");
414+ file.addAction("&One");
415+ file.addAction("&Two");
416+ file.addAction("T&hree");
417+ file.addAction("Fou&r");
418+ root.addMenu(&file);
419+
420+ store->indexMenu(&root);
421+
422+ ON_CALL(*usageTracker,
423+ usage(QString("app-id"), QString("File||One"))).WillByDefault(
424+ Return(2));
425+ ON_CALL(*usageTracker,
426+ usage(QString("app-id"), QString("File||Two"))).WillByDefault(
427+ Return(0));
428+ ON_CALL(*usageTracker,
429+ usage(QString("app-id"), QString("File||Three"))).WillByDefault(
430+ Return(4));
431+ ON_CALL(*usageTracker,
432+ usage(QString("app-id"), QString("File||Four"))).WillByDefault(
433+ Return(3));
434+
435+ QList<Result> results;
436+ store->search("", Query::EmptyBehaviour::NO_SUGGESTIONS, results);
437+ ASSERT_TRUE(results.empty());
438+}
439+
440 TEST_F(TestItemStore, ExecuteMarksHistory) {
441 QMenu root;
442
443
444=== modified file 'tests/unit/service/TestQuery.cpp'
445--- tests/unit/service/TestQuery.cpp 2013-12-09 11:11:18 +0000
446+++ tests/unit/service/TestQuery.cpp 2014-03-14 14:07:05 +0000
447@@ -113,13 +113,15 @@
448
449 EXPECT_CALL(*window, activate()).WillOnce(Return(windowToken));
450
451- EXPECT_CALL(*windowToken, search(queryString, _)).WillOnce(
452- Invoke([&expectedResults](const QString &, QList<Result> &results) {
453+ EXPECT_CALL(*windowToken, search(queryString, Query::EmptyBehaviour::SHOW_SUGGESTIONS, _)).WillOnce(
454+ Invoke(
455+ [&expectedResults](const QString &, Query::EmptyBehaviour, QList<Result> &results) {
456 results.append(expectedResults);
457 }));
458
459- QueryImpl query(0, queryString, "keep.alive", *hudService, applicationList,
460- voice, dbus.sessionConnection());
461+ QueryImpl query(0, queryString, "keep.alive",
462+ Query::EmptyBehaviour::SHOW_SUGGESTIONS, *hudService,
463+ applicationList, voice, dbus.sessionConnection());
464
465 const QList<Result> results(query.results());
466 ASSERT_EQ(expectedResults.size(), results.size());
467@@ -129,8 +131,9 @@
468 }
469
470 TEST_F(TestQuery, ExecuteCommand) {
471- QueryImpl query(0, "query", "keep.alive", *hudService, applicationList,
472- voice, dbus.sessionConnection());
473+ QueryImpl query(0, "query", "keep.alive",
474+ Query::EmptyBehaviour::SHOW_SUGGESTIONS, *hudService,
475+ applicationList, voice, dbus.sessionConnection());
476
477 EXPECT_CALL(*windowToken, execute(123));
478 query.ExecuteCommand(QDBusVariant(123), 12345);
479@@ -144,7 +147,8 @@
480 keepAliveService->start(dbus.sessionConnection());
481
482 Query::Ptr query(
483- new QueryImpl(0, "query", "keep.alive", *hudService,
484+ new QueryImpl(0, "query", "keep.alive",
485+ Query::EmptyBehaviour::SHOW_SUGGESTIONS, *hudService,
486 applicationList, voice, dbus.sessionConnection()));
487
488 EXPECT_CALL(*hudService, closeQuery(query->path())).WillOnce(
489@@ -169,8 +173,9 @@
490 }
491
492 TEST_F(TestQuery, VoiceQuery) {
493- QueryImpl query(0, "query", "keep.alive", *hudService, applicationList,
494- voice, dbus.sessionConnection());
495+ QueryImpl query(0, "query", "keep.alive",
496+ Query::EmptyBehaviour::SHOW_SUGGESTIONS, *hudService,
497+ applicationList, voice, dbus.sessionConnection());
498
499 EXPECT_CALL(*voice, listen(QList<QStringList>()
500 << (QStringList() << "command1" << "command2"))).WillOnce(

Subscribers

People subscribed via source and target branches