Merge lp://staging/~abreu-alexandre/unity-webapps-qml/fail-safe-content-hub-bindings into lp://staging/unity-webapps-qml

Proposed by Alexandre Abreu
Status: Merged
Approved by: Alexandre Abreu
Approved revision: 139
Merged at revision: 140
Proposed branch: lp://staging/~abreu-alexandre/unity-webapps-qml/fail-safe-content-hub-bindings
Merge into: lp://staging/unity-webapps-qml
Diff against target: 49 lines (+19/-4)
2 files modified
src/Ubuntu/UnityWebApps/UnityWebApps.qml (+2/-1)
src/Ubuntu/UnityWebApps/bindings/content-hub/backend/content-hub.js (+17/-3)
To merge this branch: bzr merge lp://staging/~abreu-alexandre/unity-webapps-qml/fail-safe-content-hub-bindings
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Alberto Mardegan (community) Approve
Review via email: mp+242834@code.staging.launchpad.net

Commit message

Make sure that the content hub bindings are fail safe since the content hub package is a suggests (which is fine since it is not there by default on desktop).

Description of the change

Make sure that the content hub bindings are fail safe since the content hub package is a suggests (which is fine since it is not there by default on desktop).

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alberto Mardegan (mardy) wrote :

I don't think that you need to import the QtQuick 2.0 module.
Also, I'm not sure if the exception will always be thrown, or if it's possible for Qt.createQmlObject() to return null without raising the exception; if so, you should check for its return value != null as well.

But I'm not sure of either points, so if you have already tested this and this is the correct solution, +1 from me.

review: Approve
Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

> I don't think that you need to import the QtQuick 2.0 module.

I didn't initially, but it seems to be required to known about QtObject,

> Also, I'm not sure if the exception will always be thrown, or if it's possible
> for Qt.createQmlObject() to return null without raising the exception; if so,
> you should check for its return value != null as well.

+1

> But I'm not sure of either points, so if you have already tested this and this
> is the correct solution, +1 from me.

Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

> I don't think that you need to import the QtQuick 2.0 module.

I didn't initially, but it seems to be required to known about QtObject,

> Also, I'm not sure if the exception will always be thrown, or if it's possible
> for Qt.createQmlObject() to return null without raising the exception; if so,
> you should check for its return value != null as well.

+1

> But I'm not sure of either points, so if you have already tested this and this
> is the correct solution, +1 from me.

139. By Alexandre Abreu

updates

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
140. By Alexandre Abreu

revert change

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: