Merge lp:~ken-vandine/ubuntu-system-settings/lp1438633 into lp:ubuntu-system-settings

Proposed by Ken VanDine
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 1382
Merged at revision: 1391
Proposed branch: lp:~ken-vandine/ubuntu-system-settings/lp1438633
Merge into: lp:ubuntu-system-settings
Diff against target: 24 lines (+12/-2)
1 file modified
plugins/about/PageComponent.qml (+12/-2)
To merge this branch: bzr merge lp:~ken-vandine/ubuntu-system-settings/lp1438633
Reviewer Review Type Date Requested Status
Sebastien Bacher (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+256015@code.launchpad.net

Commit message

Error checking for plugin instance and pageComponent

Description of the change

Error checking for plugin instance and pageComponent

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, but that looks like a workaround rather than a real fix, we should keep looking for the real bug there... also if we think that change is right, shouldn't we do the same for the regularitory info subscreen in the same source?

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ken VanDine (ken-vandine) wrote :

> Thanks, but that looks like a workaround rather than a real fix, we should
> keep looking for the real bug there... also if we think that change is right,
> shouldn't we do the same for the regularitory info subscreen in the same
> source?

It's a fix because it prevents us from pushing an object on the PageStack that is null. It doesn't really fix why it was null before, I'd like to figure that out too, but so far no luck. It would be good to add the same protection for regulatory page too.

Revision history for this message
Ken VanDine (ken-vandine) wrote :

> Thanks, but that looks like a workaround rather than a real fix, we should
> keep looking for the real bug there... also if we think that change is right,
> shouldn't we do the same for the regularitory info subscreen in the same
> source?

The regulatory info page already sets it to a variable before pushing the page, so system-updates was the only one not setting that to a variable.

Revision history for this message
Sebastien Bacher (seb128) wrote :

ok, fair enough, I would still like us to understand the issue but the change looks safe and should improve things

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/about/PageComponent.qml'
--- plugins/about/PageComponent.qml 2015-02-23 10:08:30 +0000
+++ plugins/about/PageComponent.qml 2015-04-13 19:12:26 +0000
@@ -196,8 +196,18 @@
196 objectName: "updateButton"196 objectName: "updateButton"
197 text: i18n.tr("Check for updates")197 text: i18n.tr("Check for updates")
198 width: parent.width - units.gu(4)198 width: parent.width - units.gu(4)
199 onClicked:199 onClicked: {
200 pageStack.push(pluginManager.getByName("system-update").pageComponent)200 var upPlugin = pluginManager.getByName("system-update")
201 if (upPlugin) {
202 var updatePage = upPlugin.pageComponent
203 if (updatePage)
204 pageStack.push(updatePage)
205 else
206 console.warn("Failed to get system-update pageComponent")
207 } else {
208 console.warn("Failed to get system-update plugin instance")
209 }
210 }
201 }211 }
202 showDivider: false212 showDivider: false
203 }213 }

Subscribers

People subscribed via source and target branches