Merge lp:~marcustomlinson/unity-scope-click/without-crashing into lp:unity-scope-click

Proposed by Marcus Tomlinson on 2016-04-15
Status: Superseded
Proposed branch: lp:~marcustomlinson/unity-scope-click/without-crashing
Merge into: lp:unity-scope-click
Diff against target: 536 lines (+125/-55)
18 files modified
libclickscope/click/download-manager.cpp (+2/-3)
libclickscope/click/pay.cpp (+0/-3)
libclickscope/click/preview.cpp (+0/-4)
libclickscope/click/reviews.cpp (+2/-1)
libclickscope/click/ubuntuone_credentials.cpp (+41/-1)
libclickscope/click/ubuntuone_credentials.h (+3/-2)
libclickscope/click/webclient.cpp (+15/-19)
libclickscope/click/webclient.h (+1/-1)
libclickscope/tests/mock_ubuntuone_credentials.h (+5/-5)
libclickscope/tests/mock_webclient.h (+2/-3)
libclickscope/tests/test_download_manager.cpp (+2/-4)
libclickscope/tests/test_index.cpp (+13/-1)
libclickscope/tests/test_reviews.cpp (+13/-0)
libclickscope/tests/test_webclient.cpp (+4/-8)
scope/clickapps/apps-scope.cpp (+6/-0)
scope/clickapps/apps-scope.h (+5/-0)
scope/clickstore/store-scope.cpp (+6/-0)
scope/clickstore/store-scope.h (+5/-0)
To merge this branch: bzr merge lp:~marcustomlinson/unity-scope-click/without-crashing
Reviewer Review Type Date Requested Status
Unity API Team 2016-04-15 Pending
Review via email: mp+291986@code.launchpad.net

Commit message

Wait for the qt main loop to be ready before allowing execution of search or preview methods

To post a comment you must log in.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libclickscope/click/download-manager.cpp'
2--- libclickscope/click/download-manager.cpp 2016-03-30 14:14:14 +0000
3+++ libclickscope/click/download-manager.cpp 2016-04-15 10:11:55 +0000
4@@ -154,11 +154,11 @@
5 });
6 QObject::connect(response.data(), &click::web::Response::error,
7 [this, callback, package_name](QString error, int error_code) {
8- qDebug() << QStringLiteral("Network error (%1) fetching click token for:").arg(error_code) << package_name.c_str();
9+ qWarning() << QStringLiteral("Network error (%1) fetching click token for:").arg(error_code) << package_name.c_str();
10 switch(error_code) {
11 case 401:
12 case 403:
13- sso->invalidateCredentials();
14+ client->invalidateCredentials();
15 callback(error.toUtf8().data(), Error::CredentialsError);
16 break;
17 default:
18@@ -172,7 +172,6 @@
19 void DownloadManager::setCredentialsService(const QSharedPointer<click::CredentialsService>& credentialsService)
20 {
21 sso = credentialsService;
22- client->setCredentialsService(sso);
23 }
24
25 } // namespace click
26
27=== modified file 'libclickscope/click/pay.cpp'
28--- libclickscope/click/pay.cpp 2016-03-30 14:14:14 +0000
29+++ libclickscope/click/pay.cpp 2016-04-15 10:11:55 +0000
30@@ -228,9 +228,6 @@
31
32 click::web::Cancellable Package::get_purchases(std::function<void(const PurchaseSet&)> callback)
33 {
34- QSharedPointer<click::CredentialsService> sso(new click::CredentialsService());
35- client->setCredentialsService(sso);
36-
37 QSharedPointer<click::web::Response> response = client->call
38 (get_base_url() + pay::API_ROOT + pay::PURCHASES_API_PATH, "GET", true);
39
40
41=== modified file 'libclickscope/click/preview.cpp'
42--- libclickscope/click/preview.cpp 2016-03-30 14:14:14 +0000
43+++ libclickscope/click/preview.cpp 2016-04-15 10:11:55 +0000
44@@ -734,8 +734,6 @@
45 std::promise<bool> promise;
46 auto future = promise.get_future();
47 run_under_qt([this, reply, &promise]() {
48- QSharedPointer<click::CredentialsService> sso(new click::CredentialsService());
49- dm->setCredentialsService(sso);
50 dm->start(download_url, download_sha512, result["name"].get_string(),
51 [this, reply, &promise] (std::string msg, DownloadManager::Error dmerr){
52 switch (dmerr)
53@@ -888,8 +886,6 @@
54 std::promise<bool> submit_promise;
55 std::future<bool> submit_future = submit_promise.get_future();
56 qt::core::world::enter_with_task([this, review, &submit_promise, widget_id]() mutable {
57- QSharedPointer<click::CredentialsService> sso(new click::CredentialsService());
58- client->setCredentialsService(sso);
59 if (widget_id == "rating") {
60 submit_operation = reviews->submit_review(review,
61 [&submit_promise](click::Reviews::Error){
62
63=== modified file 'libclickscope/click/reviews.cpp'
64--- libclickscope/click/reviews.cpp 2016-03-30 14:14:14 +0000
65+++ libclickscope/click/reviews.cpp 2016-04-15 10:11:55 +0000
66@@ -131,7 +131,8 @@
67 click::web::CallParams params;
68 params.add(click::REVIEWS_QUERY_ARGNAME, package_name.c_str());
69 QSharedPointer<click::web::Response> response = client->call
70- (get_base_url() + click::REVIEWS_API_PATH, params);
71+ (get_base_url() + click::REVIEWS_API_PATH, "GET", false,
72+ std::map<std::string, std::string>{}, "", params);
73
74 QObject::connect(response.data(), &click::web::Response::finished,
75 [=](QString reply) {
76
77=== modified file 'libclickscope/click/ubuntuone_credentials.cpp'
78--- libclickscope/click/ubuntuone_credentials.cpp 2016-03-30 14:14:14 +0000
79+++ libclickscope/click/ubuntuone_credentials.cpp 2016-04-15 10:11:55 +0000
80@@ -1,5 +1,5 @@
81 /*
82- * Copyright (C) 2014 Canonical Ltd.
83+ * Copyright (C) 2014-2016 Canonical Ltd.
84 *
85 * This program is free software: you can redistribute it and/or modify it
86 * under the terms of the GNU General Public License version 3, as published
87@@ -29,6 +29,9 @@
88
89 #include "ubuntuone_credentials.h"
90
91+#include <future>
92+#include <QCoreApplication>
93+
94 namespace u1 = UbuntuOne;
95
96 click::CredentialsService::CredentialsService()
97@@ -47,6 +50,43 @@
98 {
99 }
100
101+UbuntuOne::Token click::CredentialsService::getToken()
102+{
103+ if (!_token.isValid()) {
104+ std::promise<UbuntuOne::Token> promise;
105+ auto future = promise.get_future();
106+
107+ auto success = QObject::connect(ssoService.data(),
108+ &u1::SSOService::credentialsFound,
109+ [this, &promise](const u1::Token& token) {
110+ emit credentialsFound(_token);
111+ promise.set_value(token);
112+ });
113+ auto notfound = QObject::connect(ssoService.data(),
114+ &u1::SSOService::credentialsNotFound,
115+ [this, &promise]() {
116+ qWarning() << "No Ubuntu One token found.";
117+ emit credentialsNotFound();
118+ promise.set_value(u1::Token());
119+ });
120+
121+ getCredentials();
122+
123+ std::future_status status = future.wait_for(std::chrono::milliseconds(0));
124+ while (status != std::future_status::ready) {
125+ QCoreApplication::processEvents();
126+ qDebug() << "Processed some events, waiting to process again.";
127+ status = future.wait_for(std::chrono::milliseconds(100));
128+ }
129+
130+ _token = future.get();
131+ QObject::disconnect(success);
132+ QObject::disconnect(notfound);
133+ }
134+
135+ return _token;
136+}
137+
138 void click::CredentialsService::getCredentials()
139 {
140 ssoService->getCredentials();
141
142=== modified file 'libclickscope/click/ubuntuone_credentials.h'
143--- libclickscope/click/ubuntuone_credentials.h 2016-03-30 14:14:14 +0000
144+++ libclickscope/click/ubuntuone_credentials.h 2016-04-15 10:11:55 +0000
145@@ -1,5 +1,5 @@
146 /*
147- * Copyright (C) 2014 Canonical Ltd.
148+ * Copyright (C) 2014-2016 Canonical Ltd.
149 *
150 * This program is free software: you can redistribute it and/or modify it
151 * under the terms of the GNU General Public License version 3, as published
152@@ -47,6 +47,7 @@
153
154 CredentialsService& operator=(const CredentialsService&) = delete;
155
156+ virtual UbuntuOne::Token getToken();
157 virtual void getCredentials();
158 virtual void invalidateCredentials();
159
160@@ -57,7 +58,7 @@
161
162 private:
163 QScopedPointer<UbuntuOne::SSOService> ssoService;
164-
165+ UbuntuOne::Token _token;
166 }; // CredentialsService
167
168 } // namespace click
169
170=== modified file 'libclickscope/click/webclient.cpp'
171--- libclickscope/click/webclient.cpp 2016-03-30 14:14:14 +0000
172+++ libclickscope/click/webclient.cpp 2016-04-15 10:11:55 +0000
173@@ -82,7 +82,7 @@
174 const std::string& iri,
175 const click::web::CallParams& params)
176 {
177- return call(iri, "GET", false,
178+ return call(iri, "GET", true,
179 std::map<std::string, std::string>(), "", params);
180 }
181
182@@ -132,25 +132,21 @@
183 request->setRawHeader(DEVICE_ID_HEADER.c_str(), deviceId.data());
184
185 if (sign && !impl->sso.isNull()) {
186- click::utils::SmartConnect sc(responsePtr.data());
187- sc.connect(impl->sso.data(), &click::CredentialsService::credentialsFound,
188- [=](const UbuntuOne::Token& token) {
189- QString auth_header = token.signUrl(url.toString(),
190- method.c_str());
191- qDebug() << "Signed URL:" << request->url().toString();
192- request->setRawHeader(AUTHORIZATION_HEADER.c_str(), auth_header.toUtf8());
193- impl->sso.clear();
194- doConnect();
195- });
196- sc.connect(impl->sso.data(), &click::CredentialsService::credentialsNotFound,
197- [=]() {
198- impl->sso.clear();
199- qWarning() << "Signing reuested but no credentials found. Using unsigned URL.";
200- doConnect();
201- });
202- // TODO: Need to handle error signal once in CredentialsService.
203- impl->sso->getCredentials();
204+ auto token = impl->sso->getToken();
205+ if (token.isValid()) {
206+ QString auth_header = token.signUrl(url.toString(),
207+ method.c_str());
208+ qDebug() << "Signed URL:" << request->url().toString();
209+ request->setRawHeader(AUTHORIZATION_HEADER.c_str(), auth_header.toUtf8());
210+ } else {
211+ qWarning() << "Signing reuested but returned token is invalid.";
212+ }
213+
214+ doConnect();
215 } else {
216+ if (sign && impl->sso.isNull()) {
217+ qCritical() << "Unable to sign request without SSO object.";
218+ }
219 doConnect();
220 }
221
222
223=== modified file 'libclickscope/click/webclient.h'
224--- libclickscope/click/webclient.h 2016-03-30 14:14:14 +0000
225+++ libclickscope/click/webclient.h 2016-04-15 10:11:55 +0000
226@@ -121,7 +121,7 @@
227 virtual QSharedPointer<Response> call(
228 const std::string& iri,
229 const std::string& method,
230- bool sign = false,
231+ bool sign = true,
232 const std::map<std::string, std::string>& headers = std::map<std::string, std::string>(),
233 const std::string& data = "",
234 const CallParams& params = CallParams());
235
236=== modified file 'libclickscope/tests/mock_ubuntuone_credentials.h'
237--- libclickscope/tests/mock_ubuntuone_credentials.h 2016-03-30 14:14:14 +0000
238+++ libclickscope/tests/mock_ubuntuone_credentials.h 2016-04-15 10:11:55 +0000
239@@ -1,5 +1,5 @@
240 /*
241- * Copyright (C) 2014 Canonical Ltd.
242+ * Copyright (C) 2014-2016 Canonical Ltd.
243 *
244 * This program is free software: you can redistribute it and/or modify it
245 * under the terms of the GNU General Public License version 3, as published
246@@ -27,11 +27,11 @@
247 * files in the program, then also delete it here.
248 */
249
250+#include <token.h>
251
252 class MockCredentialsService : public click::CredentialsService {
253 public:
254- MOCK_METHOD0(getCredentials,
255- void());
256- MOCK_METHOD0(invalidateCredentials,
257- void());
258+ MOCK_METHOD0(getToken, UbuntuOne::Token());
259+ MOCK_METHOD0(getCredentials, void());
260+ MOCK_METHOD0(invalidateCredentials, void());
261 };
262
263=== modified file 'libclickscope/tests/mock_webclient.h'
264--- libclickscope/tests/mock_webclient.h 2016-03-30 14:14:14 +0000
265+++ libclickscope/tests/mock_webclient.h 2016-04-15 10:11:55 +0000
266@@ -87,13 +87,13 @@
267 QSharedPointer<click::web::Response> call(
268 const std::string& iri,
269 const click::web::CallParams& params=click::web::CallParams()) override {
270- return callImpl(iri, "GET", false,
271+ return callImpl(iri, "GET", true,
272 std::map<std::string, std::string>(), "", params);
273 }
274 QSharedPointer<click::web::Response> call(
275 const std::string& iri,
276 const std::string& method,
277- bool sign = false,
278+ bool sign = true,
279 const std::map<std::string, std::string>& headers = std::map<std::string, std::string>(),
280 const std::string& data = "",
281 const click::web::CallParams& params=click::web::CallParams()) override {
282@@ -102,7 +102,6 @@
283
284 MOCK_METHOD1(has_header, bool(const std::string& header));
285 MOCK_METHOD1(get_header, std::string(const std::string&header));
286- MOCK_METHOD0(invalidateCredentials, void());
287 };
288
289 }
290
291=== modified file 'libclickscope/tests/test_download_manager.cpp'
292--- libclickscope/tests/test_download_manager.cpp 2016-03-30 14:14:14 +0000
293+++ libclickscope/tests/test_download_manager.cpp 2016-04-15 10:11:55 +0000
294@@ -63,6 +63,7 @@
295
296 virtual void SetUp()
297 {
298+ ssoPtr.reset(new MockCredentialsService());
299 namPtr.reset(new MockNetworkAccessManager());
300 clientPtr.reset(new NiceMock<MockClient>(namPtr));
301 clientPtr->setCredentialsService(ssoPtr);
302@@ -160,9 +161,6 @@
303 LifetimeHelper<click::network::Reply, MockNetworkReply> reply;
304 auto response = responseForReply(reply.asSharedPtr());
305
306- QSharedPointer<MockCredentialsService> sso(new MockCredentialsService());
307- dmPtr->setCredentialsService(sso);
308-
309 EXPECT_CALL(reply.instance, errorString())
310 .WillOnce(Return(QString("ERROR")));
311 EXPECT_CALL(reply.instance, attribute(_)).WillOnce(Return(QVariant(401)));
312@@ -172,7 +170,7 @@
313 EXPECT_CALL(*clientPtr, callImpl(_, _, _, _, _, _))
314 .Times(1)
315 .WillOnce(Return(response));
316- EXPECT_CALL(*(sso.data()), invalidateCredentials());
317+ EXPECT_CALL(*ssoPtr, invalidateCredentials());
318 EXPECT_CALL(*this, start_callback("ERROR (201)",
319 click::DownloadManager::Error::CredentialsError)).Times(1);
320
321
322=== modified file 'libclickscope/tests/test_index.cpp'
323--- libclickscope/tests/test_index.cpp 2016-03-30 14:14:14 +0000
324+++ libclickscope/tests/test_index.cpp 2016-04-15 10:11:55 +0000
325@@ -1,5 +1,5 @@
326 /*
327- * Copyright (C) 2014 Canonical Ltd.
328+ * Copyright (C) 2014-2016 Canonical Ltd.
329 *
330 * This program is free software: you can redistribute it and/or modify it
331 * under the terms of the GNU General Public License version 3, as published
332@@ -190,6 +190,18 @@
333 indexPtr->departments("departments", [](const click::DepartmentList&, const click::HighlightList&, click::Index::Error, int) {});
334 }
335
336+TEST_F(IndexTest, testDetailsSignsCall)
337+{
338+ LifetimeHelper<click::network::Reply, MockNetworkReply> reply;
339+ auto response = responseForReply(reply.asSharedPtr());
340+
341+ EXPECT_CALL(*clientPtr, callImpl(_, _, true, _, _, _))
342+ .Times(1)
343+ .WillOnce(Return(response));
344+
345+ indexPtr->get_details("fake-app", [](const click::PackageDetails, click::Index::Error) {});
346+}
347+
348 TEST_F(IndexTest, testSearchSendsRightPath)
349 {
350 LifetimeHelper<click::network::Reply, MockNetworkReply> reply;
351
352=== modified file 'libclickscope/tests/test_reviews.cpp'
353--- libclickscope/tests/test_reviews.cpp 2016-03-30 14:14:14 +0000
354+++ libclickscope/tests/test_reviews.cpp 2016-04-15 10:11:55 +0000
355@@ -150,6 +150,19 @@
356 click::Reviews::Error) {});
357 }
358
359+TEST_F(ReviewsTest, testFetchReviewsDoesNotSignCall)
360+{
361+ LifetimeHelper<click::network::Reply, MockNetworkReply> reply;
362+ auto response = responseForReply(reply.asSharedPtr());
363+
364+ EXPECT_CALL(*clientPtr, callImpl(_, _, false, _, _, _))
365+ .Times(1)
366+ .WillOnce(Return(response));
367+
368+ reviewsPtr->fetch_reviews("", [](click::ReviewList,
369+ click::Reviews::Error) {});
370+}
371+
372 TEST_F(ReviewsTest, testFetchReviewsSendsQueryAsParam)
373 {
374 LifetimeHelper<click::network::Reply, MockNetworkReply> reply;
375
376=== modified file 'libclickscope/tests/test_webclient.cpp'
377--- libclickscope/tests/test_webclient.cpp 2016-03-30 14:14:14 +0000
378+++ libclickscope/tests/test_webclient.cpp 2016-04-15 10:11:55 +0000
379@@ -221,11 +221,9 @@
380 click::web::Client wc(namPtr);
381 wc.setCredentialsService(ssoPtr);
382
383- EXPECT_CALL(sso, getCredentials()).WillOnce(Invoke([&](){
384- UbuntuOne::Token token("token_key", "token_secret",
385- "consumer_key", "consumer_secret");
386- sso.credentialsFound(token);
387- }));
388+ EXPECT_CALL(sso, getToken())
389+ .WillOnce(Return(UbuntuOne::Token("token_key", "token_secret",
390+ "consumer_key", "consumer_secret")));
391 EXPECT_CALL(nam, sendCustomRequest(IsValidOAuthHeader(true), _, _))
392 .Times(1)
393 .WillOnce(Return(replyPtr));
394@@ -271,9 +269,7 @@
395 click::web::Client wc(namPtr);
396 wc.setCredentialsService(ssoPtr);
397
398- EXPECT_CALL(sso, getCredentials()).WillOnce(Invoke([&]() {
399- sso.credentialsNotFound();
400- }));
401+ EXPECT_CALL(sso, getToken()).WillOnce(Return(UbuntuOne::Token()));
402 EXPECT_CALL(nam, sendCustomRequest(IsValidOAuthHeader(false), _, _))
403 .Times(1)
404 .WillOnce(Return(replyPtr));
405
406=== modified file 'scope/clickapps/apps-scope.cpp'
407--- scope/clickapps/apps-scope.cpp 2016-03-30 14:14:14 +0000
408+++ scope/clickapps/apps-scope.cpp 2016-04-15 10:11:55 +0000
409@@ -49,6 +49,7 @@
410
411 click::Scope::Scope()
412 {
413+ qt_ready_f = qt_ready_p.get_future();
414 nam.reset(new click::network::AccessManager());
415 client.reset(new click::web::Client(nam));
416 index.reset(new click::Index(client));
417@@ -81,7 +82,10 @@
418 static const int zero = 0;
419 auto emptyCb = [this]()
420 {
421+ sso.reset(new click::CredentialsService());
422+ client->setCredentialsService(sso);
423 dm.reset(Ubuntu::DownloadManager::Manager::createSessionManager());
424+ qt_ready_p.set_value();
425 };
426
427 qt::core::world::build_and_run(zero, nullptr, emptyCb);
428@@ -94,12 +98,14 @@
429
430 scopes::SearchQueryBase::UPtr click::Scope::search(unity::scopes::CannedQuery const& q, scopes::SearchMetadata const& metadata)
431 {
432+ qt_ready_f.wait();
433 return scopes::SearchQueryBase::UPtr(new click::apps::Query(q, depts_db, metadata));
434 }
435
436
437 unity::scopes::PreviewQueryBase::UPtr click::Scope::preview(const unity::scopes::Result& result,
438 const unity::scopes::ActionMetadata& metadata) {
439+ qt_ready_f.wait();
440 qDebug() << "Scope::preview() called.";
441 auto preview = new click::Preview(result, metadata);
442 preview->choose_strategy(client, pay_package, dm, depts_db);
443
444=== modified file 'scope/clickapps/apps-scope.h'
445--- scope/clickapps/apps-scope.h 2016-03-30 14:14:14 +0000
446+++ scope/clickapps/apps-scope.h 2016-04-15 10:11:55 +0000
447@@ -30,6 +30,8 @@
448 #ifndef APPS_SCOPE_H
449 #define APPS_SCOPE_H
450
451+#include <future>
452+
453 #include <click/index.h>
454 #include <click/network_access_manager.h>
455 #include <click/pay.h>
456@@ -66,11 +68,14 @@
457 virtual unity::scopes::ActivationQueryBase::UPtr perform_action(unity::scopes::Result const& result, unity::scopes::ActionMetadata const& metadata, std::string const& widget_id, std::string const& action_id) override;
458
459 private:
460+ std::promise<void> qt_ready_p;
461+ std::future<void> qt_ready_f;
462 QSharedPointer<click::network::AccessManager> nam;
463 QSharedPointer<click::web::Client> client;
464 QSharedPointer<click::Index> index;
465 QSharedPointer<pay::Package> pay_package;
466 QSharedPointer<Ubuntu::DownloadManager::Manager> dm;
467+ QSharedPointer<click::CredentialsService> sso;
468 std::shared_ptr<click::DepartmentsDb> depts_db;
469
470 std::string installApplication(unity::scopes::Result const& result);
471
472=== modified file 'scope/clickstore/store-scope.cpp'
473--- scope/clickstore/store-scope.cpp 2016-03-30 14:14:14 +0000
474+++ scope/clickstore/store-scope.cpp 2016-04-15 10:11:55 +0000
475@@ -47,6 +47,7 @@
476
477 click::Scope::Scope()
478 {
479+ qt_ready_f = qt_ready_p.get_future();
480 nam.reset(new click::network::AccessManager());
481 client.reset(new click::web::Client(nam));
482 index.reset(new click::Index(client));
483@@ -83,7 +84,10 @@
484 static const int zero = 0;
485 auto emptyCb = [this]()
486 {
487+ sso.reset(new click::CredentialsService());
488+ client->setCredentialsService(sso);
489 dm.reset(Ubuntu::DownloadManager::Manager::createSessionManager());
490+ qt_ready_p.set_value();
491 };
492
493 qt::core::world::build_and_run(zero, nullptr, emptyCb);
494@@ -96,12 +100,14 @@
495
496 scopes::SearchQueryBase::UPtr click::Scope::search(unity::scopes::CannedQuery const& q, scopes::SearchMetadata const& metadata)
497 {
498+ qt_ready_f.wait();
499 return scopes::SearchQueryBase::UPtr(new click::Query(q, *index, *depts, depts_db, *highlights, metadata, *pay_package));
500 }
501
502
503 unity::scopes::PreviewQueryBase::UPtr click::Scope::preview(const unity::scopes::Result& result,
504 const unity::scopes::ActionMetadata& metadata) {
505+ qt_ready_f.wait();
506 qDebug() << "Scope::preview() called.";
507 auto preview = new click::Preview(result, metadata);
508 preview->choose_strategy(client, pay_package, dm, depts_db);
509
510=== modified file 'scope/clickstore/store-scope.h'
511--- scope/clickstore/store-scope.h 2016-03-30 14:14:14 +0000
512+++ scope/clickstore/store-scope.h 2016-04-15 10:11:55 +0000
513@@ -33,6 +33,8 @@
514 #include <click/pay.h>
515
516 #include <memory>
517+#include <future>
518+
519 #include <click/network_access_manager.h>
520 #include <click/webclient.h>
521
522@@ -69,11 +71,14 @@
523 virtual unity::scopes::ActivationQueryBase::UPtr perform_action(unity::scopes::Result const& result, unity::scopes::ActionMetadata const& metadata, std::string const& widget_id, std::string const& action_id) override;
524
525 private:
526+ std::promise<void> qt_ready_p;
527+ std::future<void> qt_ready_f;
528 QSharedPointer<click::network::AccessManager> nam;
529 QSharedPointer<click::web::Client> client;
530 QSharedPointer<click::Index> index;
531 QSharedPointer<pay::Package> pay_package;
532 QSharedPointer<Ubuntu::DownloadManager::Manager> dm;
533+ QSharedPointer<click::CredentialsService> sso;
534 std::shared_ptr<click::DepartmentLookup> depts;
535 std::shared_ptr<click::HighlightList> highlights;
536 std::shared_ptr<click::DepartmentsDb> depts_db;

Subscribers

People subscribed via source and target branches