Merge lp:~mikemc/ubuntuone-credentials/delete-on-cancel into lp:ubuntuone-credentials

Proposed by Mike McCracken
Status: Merged
Approved by: Mike McCracken
Approved revision: 61
Merged at revision: 62
Proposed branch: lp:~mikemc/ubuntuone-credentials/delete-on-cancel
Merge into: lp:ubuntuone-credentials
Diff against target: 30 lines (+8/-1)
2 files modified
online-accounts-provider/ButtonRow.qml (+1/-1)
online-accounts-provider/NewAccount.qml (+7/-0)
To merge this branch: bzr merge lp:~mikemc/ubuntuone-credentials/delete-on-cancel
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve
dobey (community) Approve
Review via email: mp+185570@code.launchpad.net

Commit message

- Do not leave an empty UOA account in the DB if the user clicks cancel.

Description of the change

- Do not leave an empty UOA account in the DB if the user clicks cancel.

TO TEST ON SAUCY desktop:
sudo apt-get build-dep ubuntuone-credentials
sudo apt-get install ubuntu-system-settings
branch this , cd into it
mkdir build
cmake -DLIB_SUFFIX=/i386-linux-gnu -DCMAKE_INSTALL_PREFIX=/usr ..
sudo make install

- run /usr/bin/system-settings
- click on "accounts":
 IF you see a list of existing accounts, click on "Add account" at the bottom, then "Ubuntu One".
 IF you see a screen saying "no accounts", click on "Ubuntu One" in the list below.

- Click "cancel"

IF necessary, click "accounts" again to get back to the accounts list (this is a UOA bug #1223963 )

There should be no account in the list.

To post a comment you must log in.
Revision history for this message
dobey (dobey) :
review: Approve
Revision history for this message
Roberto Alsina (ralsina) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'online-accounts-provider/ButtonRow.qml'
2--- online-accounts-provider/ButtonRow.qml 2013-09-12 14:59:06 +0000
3+++ online-accounts-provider/ButtonRow.qml 2013-09-13 18:51:26 +0000
4@@ -12,7 +12,7 @@
5 height: parent.height
6 width: (parent.width / 2) - 0.5 * parent.spacing
7 onClicked: {
8- finished();
9+ userCancelled();
10 }
11 }
12 Button {
13
14=== modified file 'online-accounts-provider/NewAccount.qml'
15--- online-accounts-provider/NewAccount.qml 2013-09-13 18:31:34 +0000
16+++ online-accounts-provider/NewAccount.qml 2013-09-13 18:51:26 +0000
17@@ -184,6 +184,13 @@
18 }
19 }
20
21+ function userCancelled() {
22+ console.debug("Removing account ID: " + account.accountId);
23+ account.removed.connect(finished);
24+ account.remove(Account.RemoveCredentials);
25+ resetUI();
26+ }
27+
28 /* processForm uses a timer to delay calling u1credservice, which can
29 take a while, to ensure that the loadingOverlay is shown
30 immediately.

Subscribers

People subscribed via source and target branches

to all changes: