Merge lp:~ahayzen/ubuntu-weather-app/reboot-fix-startup-console-errors-0 into lp:ubuntu-weather-app

Proposed by Andrew Hayzen
Status: Merged
Approved by: Victor Thompson
Approved revision: 73
Merged at revision: 72
Proposed branch: lp:~ahayzen/ubuntu-weather-app/reboot-fix-startup-console-errors-0
Merge into: lp:ubuntu-weather-app
Diff against target: 23 lines (+2/-1)
2 files modified
app/ui/HomePage.qml (+1/-1)
debian/changelog (+1/-0)
To merge this branch: bzr merge lp:~ahayzen/ubuntu-weather-app/reboot-fix-startup-console-errors-0
Reviewer Review Type Date Requested Status
Victor Thompson Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+266046@code.launchpad.net

Commit message

* Fix for console error on startup if there are no locations

Description of the change

* Fix for console error on startup if there are no locations

STEPS TO REPRODUCE ISSUE:
1) Ensure that the application has no stored locations and auto detect location is off
2) Restart the application
3) Notice in the console the following
file:///home/andy/Workspace/ubuntu/ubuntu-weather-app-reboot/app/ui/HomePage.qml:105: TypeError: Cannot read property of null

TESTING:
At step 3 no console warning should no appear.

To post a comment you must log in.
Revision history for this message
Victor Thompson (vthompson) wrote :

See inline comment.

review: Needs Information
73. By Andrew Hayzen

* Move + units.gu(3) inside true statement

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Yup that makes sense, changed :-)

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

lgtm!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/ui/HomePage.qml'
2--- app/ui/HomePage.qml 2015-07-25 21:49:25 +0000
3+++ app/ui/HomePage.qml 2015-07-27 22:03:33 +0000
4@@ -102,7 +102,7 @@
5 height: parent.height
6
7 // FIXME: not sure where the 3GU comes from, PullToRefresh or something in HomePage?
8- contentHeight: locationPages.currentItem.childrenRect.height + units.gu(3)
9+ contentHeight: locationPages.currentItem ? locationPages.currentItem.childrenRect.height + units.gu(3) : 0
10 contentWidth: parent.width
11
12 Behavior on contentHeight {
13
14=== modified file 'debian/changelog'
15--- debian/changelog 2015-07-26 15:24:27 +0000
16+++ debian/changelog 2015-07-27 22:03:33 +0000
17@@ -12,6 +12,7 @@
18 * Add mocked locations for autopilot and add a test using the data
19 * Add setting to disable auto detecting location
20 * When running under autopilot do not auto detect location
21+ * Fix for console error on startup if there are no locations
22
23 -- Victor Thompson <victor.thompson@gmail.com> Mon, 01 Jun 2015 20:11:23 -0500
24

Subscribers

People subscribed via source and target branches

to all changes: