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
1=== modified file 'plugins/about/PageComponent.qml'
2--- plugins/about/PageComponent.qml 2015-02-23 10:08:30 +0000
3+++ plugins/about/PageComponent.qml 2015-04-13 19:12:26 +0000
4@@ -196,8 +196,18 @@
5 objectName: "updateButton"
6 text: i18n.tr("Check for updates")
7 width: parent.width - units.gu(4)
8- onClicked:
9- pageStack.push(pluginManager.getByName("system-update").pageComponent)
10+ onClicked: {
11+ var upPlugin = pluginManager.getByName("system-update")
12+ if (upPlugin) {
13+ var updatePage = upPlugin.pageComponent
14+ if (updatePage)
15+ pageStack.push(updatePage)
16+ else
17+ console.warn("Failed to get system-update pageComponent")
18+ } else {
19+ console.warn("Failed to get system-update plugin instance")
20+ }
21+ }
22 }
23 showDivider: false
24 }

Subscribers

People subscribed via source and target branches