on xenial help sign in
Undo hotfixes to remove Ubuntu.Web, it's apparently not the problem
4e4cacaMichael Terry
qml/Wizard/DelayedWebView.qmldeleted−26
@@ -1,26 +0,0 @@
1−/*
2− * Copyright (C) 2016 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.4
18−import Ubuntu.Web 0.2
19−
20−// FIXME: we use this separate file to avoid import Ubuntu.Web, because we're
21−// seeing freezes in unity8 after the wizard shuts down, seemingly due to oxide?
22−// So for now, as a hotfix, we only load the webview when necessary.
23−// Also see Wizard.qml, where we avoid unloading the wizard at all for
24−// similar mitigation reasons while we root-cause the problem.
25−WebView {
26−}
qml/Wizard/Pages/75-report-check.qml+3−13
@@ -16,6 +16,7 @@
16
16
17import QtQuick 2.4
17import QtQuick 2.4
18import Ubuntu.Components 1.3
18import Ubuntu.Components 1.3
19+import Ubuntu.Web 0.2
19import ".." as LocalComponents
20import ".." as LocalComponents
20
21
21LocalComponents.Page {
22LocalComponents.Page {
@@ -62,29 +63,18 @@ LocalComponents.Page {
62 onLinkActivated: {
63 onLinkActivated: {
63 webview.url = "http://www.ubuntu.com/legal/terms-and-policies/privacy-policy";
64 webview.url = "http://www.ubuntu.com/legal/terms-and-policies/privacy-policy";
64 webview.visible = true;
65 webview.visible = true;
65− webview.active = true;
66 }
66 }
67 }
67 }
68
68
69− // FIXME: we use a loader, because we're seeing freezes in unity8 after
69+ WebView {
70− // wizard shuts down, seemingly due to oxide? So for now, as a hotfix,
71− // we only load the webview when necessary.
72− // Also see Wizard.qml, where we avoid unloading the wizard at all for
73− // similar mitigation reasons while we root-cause the problem.
74− Loader {
75 id: webview
70 id: webview
71+ objectName: "webview"
76 anchors.left: parent.left
72 anchors.left: parent.left
77 anchors.right: parent.right
73 anchors.right: parent.right
78 anchors.leftMargin: -leftMargin
74 anchors.leftMargin: -leftMargin
79 anchors.rightMargin: -rightMargin
75 anchors.rightMargin: -rightMargin
80 height: parent.height
76 height: parent.height
81 visible: false
77 visible: false
82− active: false
83− property string url
84− sourceComponent: LocalComponents.DelayedWebView {
85− objectName: "webview"
86− url: webview.url
87− }
88 }
78 }
89 }
79 }
90
80
qml/Wizard/Wizard.qml+2−11
@@ -27,7 +27,7 @@ Showable {
27 // changing values. Having it cached as a proper Qml bool property prevents
27 // changing values. Having it cached as a proper Qml bool property prevents
28 // unnecessary 'changed' emissions and provides consuming classes the
28 // unnecessary 'changed' emissions and provides consuming classes the
29 // expected behavior of no emission on startup.
29 // expected behavior of no emission on startup.
30− readonly property bool active: System.wizardEnabled
30+ readonly property bool active: loader.active
31
31
32 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
32 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
33
33
@@ -37,20 +37,11 @@ Showable {
37 }
37 }
38 }
38 }
39
39
40− // FIXME: we make active state a one way road, because we're seeing freezes
41− // in unity8 after wizard shuts down, seemingly due to oxide? So for now,
42− // as a hotfix, just don't shut the wizard memory down.
43− // Also see 75-report-check.qml, where we avoid unloading the wizard at all
44− // for similar mitigation reasons while we root-cause the problem.
45− onActiveChanged: if (active) loader.active = true
46− Component.onCompleted: if (active) loader.active = true
47−
48 Loader {
40 Loader {
49 id: loader
41 id: loader
50 anchors.fill: parent
42 anchors.fill: parent
51− active: false
43+ active: System.wizardEnabled
52 source: "Pages.qml"
44 source: "Pages.qml"
53− visible: root.visible && root.active
54
45
55 Connections {
46 Connections {
56 target: loader.item
47 target: loader.item