on xenial help sign in
Undo hotfixes to remove Ubuntu.Web, it's apparently not the problem
commit4e4caca7fbdafa361d42574d2121711fc0edc7d9 authorMichael Terry <michael.terry@canonical.com> dateMon 21 Mar 2016, 19:38 (11 years ago) parent2ff32ae
3 files changed+5−50
qml/Wizard/DelayedWebView.qml−26 qml/Wizard/Pages/75-report-check.qml+3−13 qml/Wizard/Wizard.qml+2−11
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 @@
1616
1717import QtQuick 2.4
1818import Ubuntu.Components 1.3
19+import Ubuntu.Web 0.2
1920import ".." as LocalComponents
2021
2122LocalComponents.Page {
@@ -62,29 +63,18 @@ LocalComponents.Page {
6263 onLinkActivated: {
6364 webview.url = "http://www.ubuntu.com/legal/terms-and-policies/privacy-policy";
6465 webview.visible = true;
65− webview.active = true;
6666 }
6767 }
6868
69− // FIXME: we use a loader, because we're seeing freezes in unity8 after
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 {
69+ WebView {
7570 id: webview
71+ objectName: "webview"
7672 anchors.left: parent.left
7773 anchors.right: parent.right
7874 anchors.leftMargin: -leftMargin
7975 anchors.rightMargin: -rightMargin
8076 height: parent.height
8177 visible: false
82− active: false
83− property string url
84− sourceComponent: LocalComponents.DelayedWebView {
85− objectName: "webview"
86− url: webview.url
87− }
8878 }
8979 }
9080
qml/Wizard/Wizard.qml+2−11
@@ -27,7 +27,7 @@ Showable {
2727 // changing values. Having it cached as a proper Qml bool property prevents
2828 // unnecessary 'changed' emissions and provides consuming classes the
2929 // expected behavior of no emission on startup.
30− readonly property bool active: System.wizardEnabled
30+ readonly property bool active: loader.active
3131
3232 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
3333
@@ -37,20 +37,11 @@ Showable {
3737 }
3838 }
3939
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−
4840 Loader {
4941 id: loader
5042 anchors.fill: parent
51− active: false
43+ active: System.wizardEnabled
5244 source: "Pages.qml"
53− visible: root.visible && root.active
5445
5546 Connections {
5647 target: loader.item