Merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/popoverRootItemArgument into lp:ubuntu-ui-toolkit/staging

Proposed by Cris Dywan
Status: Merged
Approved by: Timo Jyrinki
Approved revision: 2101
Merged at revision: 2110
Proposed branch: lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/popoverRootItemArgument
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 33 lines (+5/-3)
2 files modified
src/imports/Components/Pickers/1.3/PickerPanel.qml (+4/-2)
src/imports/Components/Popups/1.3/popupUtils.js (+1/-1)
To merge this branch: bzr merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/popoverRootItemArgument
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Zsombor Egri Approve
Review via email: mp+305904@code.launchpad.net

Commit message

Try harder to pass an item to QuickUtils.rootItem

Description of the change

Adressing TypeError, more specifically, picker popups not opening because the root item is not valid.

To post a comment you must log in.
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote :

Nice finding, thanks for fixing!

review: Approve
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Yakkety tests now fixed ("fixed") with another MP, retopapproving.

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/imports/Components/Pickers/1.3/PickerPanel.qml'
2--- src/imports/Components/Pickers/1.3/PickerPanel.qml 2016-05-25 12:48:10 +0000
3+++ src/imports/Components/Pickers/1.3/PickerPanel.qml 2016-09-16 07:22:21 +0000
4@@ -143,12 +143,14 @@
5
6 function openPopover(caller, params) {
7 var popover = PopupUtils.open(datePickerPopover, caller, params);
8- popover.parent = QuickUtils.rootItem(null);
9+ // Avoid confusing TypeError if popover couldn't be created
10+ if (popover)
11+ popover.parent = QuickUtils.rootItem(caller);
12 return popover;
13 }
14 function openPanel(caller, params) {
15 params["caller"] = caller;
16- var panel = datePickerPanel.createObject(QuickUtils.rootItem(null), params);
17+ var panel = datePickerPanel.createObject(QuickUtils.rootItem(caller), params);
18 return panel;
19 }
20 }
21
22=== modified file 'src/imports/Components/Popups/1.3/popupUtils.js'
23--- src/imports/Components/Popups/1.3/popupUtils.js 2016-08-29 10:18:30 +0000
24+++ src/imports/Components/Popups/1.3/popupUtils.js 2016-09-16 07:22:21 +0000
25@@ -51,7 +51,7 @@
26 if (popup.createObject) {
27 // popup is a component and can create an object
28 popupComponent = popup;
29- rootObject = QuickUtils.rootItem(popup);
30+ rootObject = QuickUtils.rootItem(caller !== undefined ? caller : popup);
31 } else if (typeof popup === "string") {
32 popupComponent = Qt.createComponent(popup);
33 rootObject = (caller !== undefined) ? QuickUtils.rootItem(caller) : QuickUtils.rootItem(null);

Subscribers

People subscribed via source and target branches