Merge lp:~mterry/unity8/tutorial-reappears into lp:unity8
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Michael Terry | ||||
Approved revision: | 1700 | ||||
Merged at revision: | 1717 | ||||
Proposed branch: | lp:~mterry/unity8/tutorial-reappears | ||||
Merge into: | lp:unity8 | ||||
Prerequisite: | lp:~mterry/unity8/skip-spread-tutorial-on-desktop | ||||
Diff against target: |
169 lines (+30/-47) 4 files modified
qml/Shell.qml (+25/-26) qml/Tutorial/Tutorial.qml (+0/-14) qml/Tutorial/TutorialContent.qml (+0/-7) tests/qmltests/tst_Shell.qml (+5/-0) |
||||
To merge this branch: | bzr merge lp:~mterry/unity8/tutorial-reappears | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Pending | |
Albert Astals Cid | Pending | ||
Review via email: mp+255191@code.launchpad.net |
This proposal supersedes a proposal from 2015-03-26.
Commit message
Make sure the edge tutorial is destroyed when we receive a call during the wizard.
Description of the change
Make sure the edge tutorial is destroyed when we receive a call during the wizard.
Now... This bug doesn't make sense to me. What's happening is that the Tutorial.qml Loader is correctly marked as "active=false". But the loaded object is not actually released/destroyed.
I couldn't figure why this was happening. And I couldn't reproduce it via qmltests. In all cases I saw, the object was correctly destroyed. But I could reproduce the bug on the device. And adding log printfs indicated that yup, the object was staying around after Loader.active was false.
But on a hunch, cleaning up the object hierarchy helped. Before, each tutorial page would have a visual parent of "shell.stages" but a QtObject parent of the tutorial loader item. This is a leftover from before the latest tutorial redesign. Now visual parents *shouldn't* affect object lifecycle, I think...? But it seems like it does.
Because when I made the tutorial page's visual parents be the same as their QtObject parents (and just moved the whole Tutorial object underneath shell.stages), it worked fine. The tutorial objects were destroyed when the loader went inactive.
Do any Qml-heads know why this happens? I would guess some refcounting somewhere, but I don't know why I couldn't reproduce in qmltests.
I added some sanity checks at the end of the current test for wizard/tutorial early exit, which don't hurt. But even without my qml changes, they still pass (because I could never reproduce this bug in laboratory conditions).
== Checklist ==
* Are there any related MPs required for this MP to build/function as expected? Please list.
No
* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes
* Did you make sure that your branch does not contain spurious tags?
Yes
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
NA
* If you changed the UI, has there been a design review?
NA
(Oh yeah, and I cleared out a couple unused vestigial properties: stages and overlay)