Merge lp:~michael-sheldon/content-hub/fix-initial-peer-list into lp:content-hub

Proposed by Michael Sheldon on 2015-09-02
Status: Merged
Approved by: Ken VanDine on 2015-09-09
Approved revision: 243
Merged at revision: 244
Proposed branch: lp:~michael-sheldon/content-hub/fix-initial-peer-list
Merge into: lp:content-hub
Diff against target: 33 lines (+3/-2)
2 files modified
import/Ubuntu/Content/contentpeermodel.cpp (+2/-2)
import/Ubuntu/Content/contenttype.h (+1/-0)
To merge this branch: bzr merge lp:~michael-sheldon/content-hub/fix-initial-peer-list
Reviewer Review Type Date Requested Status
Ken VanDine 2015-09-02 Approve on 2015-09-09
PS Jenkins bot continuous-integration Approve on 2015-09-02
Review via email: mp+269917@code.launchpad.net

Commit Message

Add an "Undefined" content type to QML bindings so we can avoid making unnecessary peer look ups when the content type hasn't yet been set now that peers can register for Unknown.

Description of the Change

Add an "Undefined" content type to QML bindings so we can avoid making unnecessary peer look ups when the content type hasn't yet been set now that peers can register for Unknown.

To post a comment you must log in.
Michael Sheldon (michael-sheldon) 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

If you changed UI labels, did you update the pot file?

 * No

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

 * No

Michael Sheldon (michael-sheldon) wrote :

This can be tested using the browser branch from silo 17, steps to reproduce:

1) Uninstall files-app or anything else that registers as an All/Unknown destination (if installed)

2) Download a zip file in the browser

3) Open the Downloads page

4) Click on the zip file

Without this branch the browser will appear in the content peer picker the first time

With this branch the content the "Sorry, no applications" message will be displayed correctly.

Ken VanDine (ken-vandine) wrote :

I ran through the test plan, and it works well with one exception. With the browser from silo 17, the browser shows up as a source for picking when trying to attach in gmail. Choosing the browser in the peer picker, opens another peer picker. I think it triggering an onExportRequested in the browser. Nothing needs to be fixed in content-hub though, I think it's just a bug in the branch of the browser in silo 17.

Ken VanDine (ken-vandine) 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 'import/Ubuntu/Content/contentpeermodel.cpp'
2--- import/Ubuntu/Content/contentpeermodel.cpp 2015-06-24 20:22:45 +0000
3+++ import/Ubuntu/Content/contentpeermodel.cpp 2015-09-02 14:00:38 +0000
4@@ -34,7 +34,7 @@
5
6 ContentPeerModel::ContentPeerModel(QObject *parent)
7 : QObject(parent),
8- m_contentType(ContentType::Unknown),
9+ m_contentType(ContentType::Undefined),
10 m_handler(ContentHandler::Source),
11 m_complete(false)
12 {
13@@ -106,7 +106,7 @@
14 appendPeersForContentType(ContentType::Text);
15 appendPeersForContentType(ContentType::Events);
16 appendPeersForContentType(ContentType::Unknown);
17- } else {
18+ } else if (m_contentType != ContentType::Undefined) {
19 appendPeersForContentType(m_contentType);
20 }
21 Q_EMIT findPeersCompleted();
22
23=== modified file 'import/Ubuntu/Content/contenttype.h'
24--- import/Ubuntu/Content/contenttype.h 2015-06-24 20:22:45 +0000
25+++ import/Ubuntu/Content/contenttype.h 2015-09-02 14:00:38 +0000
26@@ -29,6 +29,7 @@
27
28 public:
29 enum Type {
30+ Undefined = -2,
31 All = -1,
32 Unknown = 0,
33 Documents = 1,

Subscribers

People subscribed via source and target branches