on xenial help sign in
Save password when updating the system
524dc07Dalton Durst
qml/Wizard/Pages.qml+8−5
@@ -84,19 +84,22 @@ StyledItem {
84 }
84 }
85 }
85 }
86
86
87− function quitWizard() {
87+ function savePassword() {
88− pageStack.currentPage.enabled = false;
89−
90 if (password != "") {
88 if (password != "") {
91− var errorMsg = securityPrivacy.setSecurity("", password, passwordMethod)
89+ var errorMsg = securityPrivacy.setSecurity("", password, passwordMethod);
92 if (errorMsg !== "") {
90 if (errorMsg !== "") {
93 // Ignore (but log) any errors, since we're past where the user set
91 // Ignore (but log) any errors, since we're past where the user set
94 // the method. Worst case, we just leave the user with a swipe
92 // the method. Worst case, we just leave the user with a swipe
95 // security method and they fix it in the system settings.
93 // security method and they fix it in the system settings.
96− console.log("Wizard: Error setting security method:", errorMsg)
94+ console.log("Wizard: Error setting security method:", errorMsg);
97 }
95 }
98 }
96 }
99
97
98+ }
99+
100+ function quitWizard() {
101+ pageStack.currentPage.enabled = false;
102+ savePassword();
100 quit();
103 quit();
101 }
104 }
102
105
qml/Wizard/Pages/79-system-update.qml+1
@@ -116,6 +116,7 @@ LocalComponents.Page {
116 objectName: "installButton"
116 objectName: "installButton"
117 anchors.fill: parent
117 anchors.fill: parent
118 onClicked: {
118 onClicked: {
119+ root.savePassword();
119 System.skipUntilFinishedPage();
120 System.skipUntilFinishedPage();
120 SystemImage.applyUpdate();
121 SystemImage.applyUpdate();
121 }
122 }