Merge lp:~ken-vandine/content-hub/charge-downloaded into lp:content-hub

Proposed by Ken VanDine
Status: Merged
Approved by: Michael Sheldon
Approved revision: 102
Merged at revision: 105
Proposed branch: lp:~ken-vandine/content-hub/charge-downloaded
Merge into: lp:content-hub
Diff against target: 19 lines (+10/-0)
1 file modified
src/com/ubuntu/content/detail/service.cpp (+10/-0)
To merge this branch: bzr merge lp:~ken-vandine/content-hub/charge-downloaded
Reviewer Review Type Date Requested Status
Michael Sheldon (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+220591@code.launchpad.net

Commit message

Check for completed downloads when an import handler is registered, charge if necessary. This will trigger an import for completed downloads that might have been dismissed in the notification.

Description of the change

Check for completed downloads when an import handler is registered, charge if necessary. This will trigger an import for completed downloads that might have been dismissed in the notification.

To post a comment you must log in.
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Are there any related MPs required for this MP to build/function as expected? Please list.

 * No

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)

 * Yes

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?

 * Yes

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/content-hub) on device or emulator?

 * Yes

If you changed the UI, was the change specified/approved by design?

 * No change

If you changed the packaging (debian), did you subscribe a core-dev to this MP?

 * No change

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?

 * Yes

Did CI run pass? If not, please explain why.

 * Yes

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 'src/com/ubuntu/content/detail/service.cpp'
2--- src/com/ubuntu/content/detail/service.cpp 2014-05-05 19:50:10 +0000
3+++ src/com/ubuntu/content/detail/service.cpp 2014-05-22 09:32:09 +0000
4@@ -552,5 +552,15 @@
5 r->handler->HandleShare(QDBusObjectPath{t->import_path()});
6 }
7 }
8+ else if ((t->destination() == peer_id) && (t->State() == cuc::Transfer::downloaded))
9+ {
10+ TRACE() << Q_FUNC_INFO << "Found destination:" << peer_id << "Direction:" << t->Direction();
11+ if (t->Direction() == cuc::Transfer::Export)
12+ {
13+ TRACE() << Q_FUNC_INFO << "Found downloaded import, charging";
14+ if (r->handler->isValid())
15+ t->Charge(QStringList());
16+ }
17+ }
18 }
19 }

Subscribers

People subscribed via source and target branches