Merge lp:~marcustomlinson/unity-scopes-shell/oa_ui_policy into lp:unity-scopes-shell

Proposed by Marcus Tomlinson
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 177
Merged at revision: 176
Proposed branch: lp:~marcustomlinson/unity-scopes-shell/oa_ui_policy
Merge into: lp:unity-scopes-shell
Diff against target: 14 lines (+4/-0)
1 file modified
src/Unity/scope.cpp (+4/-0)
To merge this branch: bzr merge lp:~marcustomlinson/unity-scopes-shell/oa_ui_policy
Reviewer Review Type Date Requested Status
Paweł Stołowski (community) Approve
Review via email: mp+244264@code.launchpad.net

Commit message

Set UNITY_SCOPES_OA_UI_POLICY on entry to Scope::loginToAccount()

To post a comment you must log in.
Revision history for this message
Paweł Stołowski (stolowski) wrote :

+ setenv("UNITY_SCOPES_OA_UI_POLICY", "1", 1);

Could you please add a comment explaining what it does and why?

review: Needs Fixing
176. By Marcus Tomlinson

replace = 0

177. By Marcus Tomlinson

Added a comment

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

> + setenv("UNITY_SCOPES_OA_UI_POLICY", "1", 1);
>
> Could you please add a comment explaining what it does and why?

Done

Revision history for this message
Paweł Stołowski (stolowski) wrote :

LGTM. +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Unity/scope.cpp'
2--- src/Unity/scope.cpp 2014-11-19 15:12:52 +0000
3+++ src/Unity/scope.cpp 2014-12-10 09:55:06 +0000
4@@ -1242,6 +1242,10 @@
5
6 bool Scope::loginToAccount(QString const& service_name, QString const& service_type, QString const& provider_name)
7 {
8+ // Set the UNITY_SCOPES_OA_UI_POLICY environment variable here so that OnlineAccountClient knows we're
9+ // calling it from the shell (hence it will use the default UI policy when talking to libsignon).
10+ setenv("UNITY_SCOPES_OA_UI_POLICY", "1", 0);
11+
12 bool service_enabled = false;
13 {
14 // Check if at least one account has the specified service enabled

Subscribers

People subscribed via source and target branches

to all changes: