Merge lp:~mardy/unity-scopes-shell/clientid-1554040 into lp:unity-scopes-shell

Proposed by Alberto Mardegan on 2016-03-10
Status: Merged
Approved by: Marcus Tomlinson on 2016-04-14
Approved revision: 301
Merged at revision: 305
Proposed branch: lp:~mardy/unity-scopes-shell/clientid-1554040
Merge into: lp:unity-scopes-shell
Diff against target: 108 lines (+12/-6)
6 files modified
CMakeLists.txt (+1/-1)
debian/control.in (+1/-1)
src/Unity/logintoaccount.cpp (+5/-2)
src/Unity/logintoaccount.h (+3/-2)
src/Unity/previewmodel.cpp (+1/-0)
src/Unity/scope.cpp (+1/-0)
To merge this branch: bzr merge lp:~mardy/unity-scopes-shell/clientid-1554040
Reviewer Review Type Date Requested Status
Marcus Tomlinson (community) 2016-03-10 Approve on 2016-04-14
PS Jenkins bot continuous-integration Needs Fixing on 2016-04-14
Review via email: mp+288651@code.launchpad.net

Commit Message

Allow clients to specify authentication parameters.

Description of the Change

Allow clients to specify authentication parameters.

To post a comment you must log in.
Marcus Tomlinson (marcustomlinson) wrote :

Sorry that this MP has not yet been reviewed, our team is swamped at the moment with OTA10 work. Please bare with us.

Marcus Tomlinson (marcustomlinson) wrote :

Looks good. Although, I still need to give silo 79 a proper spin. Could you please address the following in the mean time:

1) Please update:

  pkg_check_modules(SCOPESLIB REQUIRED libunity-scopes>=1.0.1)

to:

  pkg_check_modules(SCOPESLIB REQUIRED libunity-scopes>=1.0.4)

in:

  /CMakeLists.txt

2) Please update:

  libunity-scopes-dev (>= 1.0.1~),

to:

  libunity-scopes-dev (>= 1.0.4~),

in:

  /debian/control.in

review: Needs Fixing
297. By Alberto Mardegan on 2016-03-16

Bump dependency version

review: Needs Information
298. By Alberto Mardegan on 2016-03-16

remove leftover

Marcus Tomlinson (marcustomlinson) wrote :

Looks good. Before approving though I would like silo 41 to land before I test this in silo 79.

299. By Alberto Mardegan on 2016-03-16

Bump dep

300. By Alberto Mardegan on 2016-04-07

Merge trunk

[ Pawel Stolowski ]
* Preliminary support for filters.
[ CI Train Bot ]
* debian/libscope-harness.symbols.in: update to released version.
[ Marcus Tomlinson ]
* The "FIXME" in Scope::executeCannedQuery() is no longer necessary
  since scope->invalidateResults() itself now ensures that there is
  only ever one search is in progress. (LP: #1537139)

301. By Alberto Mardegan on 2016-04-14

Merge from trunk

[ CI Train Bot ]
* Resync trunk.
[ Marcus Tomlinson ]
* Replace QSettings with unity::util::IniParser (LP: #1552082)
[ Robert Bruce Park ]
* Use new bileto_pre_release_hook.

Marcus Tomlinson (marcustomlinson) wrote :

Tested on the phone and looks good! +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2016-03-07 12:03:28 +0000
3+++ CMakeLists.txt 2016-04-14 11:13:32 +0000
4@@ -50,7 +50,7 @@
5 find_package(Qt5Test)
6 find_package(Boost COMPONENTS regex REQUIRED)
7
8-pkg_check_modules(SCOPESLIB REQUIRED libunity-scopes>=1.0.4)
9+pkg_check_modules(SCOPESLIB REQUIRED libunity-scopes>=1.0.5)
10 pkg_check_modules(SCOPES_API REQUIRED unity-shell-scopes=11)
11
12 pkg_check_modules(GSETTINGSQT REQUIRED gsettings-qt)
13
14=== modified file 'debian/control.in'
15--- debian/control.in 2016-03-29 06:38:28 +0000
16+++ debian/control.in 2016-04-14 11:13:32 +0000
17@@ -9,7 +9,7 @@
18 libboost-python-dev,
19 libboost-regex-dev,
20 libunity-api-dev (>= 7.109),
21- libunity-scopes-dev (>= 1.0.4~),
22+ libunity-scopes-dev (>= 1.0.5~),
23 libgsettings-qt-dev (>= 0.1),
24 libqtdbustest1-dev (>= 0.2),
25 libqtdbusmock1-dev (>= 0.2),
26
27=== modified file 'src/Unity/logintoaccount.cpp'
28--- src/Unity/logintoaccount.cpp 2015-09-23 15:07:28 +0000
29+++ src/Unity/logintoaccount.cpp 2016-04-14 11:13:32 +0000
30@@ -18,18 +18,20 @@
31 */
32
33 #include "logintoaccount.h"
34+#include "utils.h"
35 #include <unity/scopes/OnlineAccountClient.h>
36 #include <QtConcurrent>
37
38 using namespace unity;
39
40-LoginToAccount::LoginToAccount(QString const& scope_id, QString const& service_name, QString const& service_type, QString const& provider_name,
41+LoginToAccount::LoginToAccount(QString const& scope_id, QString const& service_name, QString const& service_type, QString const& provider_name, QVariantMap const& auth_params,
42 int login_passed_action, int login_failed_action, QObject *parent)
43 : QObject(parent),
44 m_scope_id(scope_id),
45 m_service_name(service_name),
46 m_service_type(service_type),
47 m_provider_name(provider_name),
48+ m_auth_params(auth_params),
49 m_login_passed_action(login_passed_action),
50 m_login_failed_action(login_failed_action)
51 {
52@@ -60,7 +62,8 @@
53 QFuture<bool> service_enabled_future = QtConcurrent::run([&]
54 {
55 // Check if at least one account has the specified service enabled
56- scopes::OnlineAccountClient oa_client(m_service_name.toStdString(), m_service_type.toStdString(), m_provider_name.toStdString());
57+ scopes::OnlineAccountClient oa_client(m_service_name.toStdString(), m_service_type.toStdString(), m_provider_name.toStdString(),
58+ scopes_ng::qVariantToScopeVariant(m_auth_params).get_dict());
59 auto service_statuses = oa_client.get_service_statuses();
60 for (auto const& status : service_statuses)
61 {
62
63=== modified file 'src/Unity/logintoaccount.h'
64--- src/Unity/logintoaccount.h 2015-09-23 15:07:28 +0000
65+++ src/Unity/logintoaccount.h 2016-04-14 11:13:32 +0000
66@@ -28,8 +28,8 @@
67 Q_OBJECT
68
69 public:
70- LoginToAccount(QString const& scope_id, QString const& service_name, QString const& service_type, QString const& provider_name, int login_passed_action, int
71- login_failed_action, QObject *parent);
72+ LoginToAccount(QString const& scope_id, QString const& service_name, QString const& service_type, QString const& provider_name, QVariantMap const& auth_params,
73+ int login_passed_action, int login_failed_action, QObject *parent);
74 void loginToAccount();
75
76 Q_SIGNALS:
77@@ -45,6 +45,7 @@
78 QString m_service_name;
79 QString m_service_type;
80 QString m_provider_name;
81+ QVariantMap m_auth_params;
82 int m_login_passed_action;
83 int m_login_failed_action;
84 };
85
86=== modified file 'src/Unity/previewmodel.cpp'
87--- src/Unity/previewmodel.cpp 2016-02-17 16:32:49 +0000
88+++ src/Unity/previewmodel.cpp 2016-04-14 11:13:32 +0000
89@@ -578,6 +578,7 @@
90 details.value(QStringLiteral("service_name")).toString(),
91 details.value(QStringLiteral("service_type")).toString(),
92 details.value(QStringLiteral("provider_name")).toString(),
93+ details.value(QStringLiteral("auth_params")).toMap(),
94 details.value(QStringLiteral("login_passed_action")).toInt(),
95 details.value(QStringLiteral("login_failed_action")).toInt(),
96 this);
97
98=== modified file 'src/Unity/scope.cpp'
99--- src/Unity/scope.cpp 2016-03-17 22:35:44 +0000
100+++ src/Unity/scope.cpp 2016-04-14 11:13:32 +0000
101@@ -1175,6 +1175,7 @@
102 details.value(QStringLiteral("service_name")).toString(),
103 details.value(QStringLiteral("service_type")).toString(),
104 details.value(QStringLiteral("provider_name")).toString(),
105+ details.value(QStringLiteral("auth_params")).toMap(),
106 details.value(QStringLiteral("login_passed_action")).toInt(),
107 details.value(QStringLiteral("login_failed_action")).toInt(),
108 this);

Subscribers

People subscribed via source and target branches

to all changes: