[usersq] Call setters to move values back from QML to the C++ side

This commit is contained in:
Adriaan de Groot 2021-03-15 11:45:57 +01:00
parent b96ad4b166
commit b17e01edff

View File

@ -56,8 +56,10 @@ Kirigami.ScrollablePage {
id: _userNameField id: _userNameField
width: parent.width width: parent.width
text: config.fullName
placeholderText: qsTr("Your Full Name") placeholderText: qsTr("Your Full Name")
text: config.fullName
onTextChanged: config.setFullName(text);
background: Rectangle { background: Rectangle {
color: "#FBFBFB" // Kirigami.Theme.backgroundColor color: "#FBFBFB" // Kirigami.Theme.backgroundColor
radius: 2 radius: 2
@ -85,6 +87,7 @@ Kirigami.ScrollablePage {
width: parent.width width: parent.width
placeholderText: qsTr("Login Name") placeholderText: qsTr("Login Name")
text: config.loginName text: config.loginName
onTextChanged: config.setLoginName(text)
background: Rectangle { background: Rectangle {
@ -122,7 +125,8 @@ Kirigami.ScrollablePage {
width: parent.width width: parent.width
placeholderText: qsTr("Computer Name") placeholderText: qsTr("Computer Name")
text: config.hostName text: config.hostName
onTextEdited: config.hostNameStatusChanged(text) onTextEdited: config.setHostName(text)
background: Rectangle { background: Rectangle {
color: "#FBFBFB" // Kirigami.Theme.backgroundColor color: "#FBFBFB" // Kirigami.Theme.backgroundColor
@ -162,10 +166,12 @@ Kirigami.ScrollablePage {
id: _passwordField id: _passwordField
width: parent.width / 2 - 10 width: parent.width / 2 - 10
placeholderText: qsTr("Password") placeholderText: qsTr("Password")
text: config.userPassword
onTextChanged: config.setUserPassword(text)
echoMode: TextInput.Password echoMode: TextInput.Password
passwordMaskDelay: 300 passwordMaskDelay: 300
inputMethodHints: Qt.ImhNoAutoUppercase inputMethodHints: Qt.ImhNoAutoUppercase
text: config.userPassword
background: Rectangle { background: Rectangle {
@ -181,10 +187,12 @@ Kirigami.ScrollablePage {
id: _verificationPasswordField id: _verificationPasswordField
width: parent.width / 2 - 10 width: parent.width / 2 - 10
placeholderText: qsTr("Repeat Password") placeholderText: qsTr("Repeat Password")
text: config.userPasswordSecondary
onTextChanged: config.setUserPasswordSecondary(text)
echoMode: TextInput.Password echoMode: TextInput.Password
passwordMaskDelay: 300 passwordMaskDelay: 300
inputMethodHints: Qt.ImhNoAutoUppercase inputMethodHints: Qt.ImhNoAutoUppercase
text: config.userPasswordSecondary
background: Rectangle { background: Rectangle {