Qt 5.12 ES5 → 7: Use "() =>" and array.includes

This commit is contained in:
miruka
2019-07-18 03:13:34 -04:00
parent f5d747cbc4
commit 8f53d2e018
11 changed files with 26 additions and 30 deletions

View File

@@ -22,11 +22,11 @@ Item {
]
buttonCallbacks: {
"yes": function(button) {
"yes": button => {
py.callCoro("save_account", [userId])
pageStack.showPage("Default")
},
"no": function(button) {
"no": button => {
py.callCoro("forget_account", [userId])
pageStack.showPage("Default")
},

View File

@@ -23,13 +23,13 @@ Item {
]
buttonCallbacks: {
"register": function(button) {},
"register": button => {},
"login": function(button) {
"login": button => {
button.loading = true
var args = [idField.text, passwordField.text]
py.callCoro("login_client", args, function(user_id) {
py.callCoro("login_client", args, user_id => {
pageStack.showPage(
"RememberAccount",
{"loginWith": loginWith, "userId": user_id}
@@ -38,7 +38,7 @@ Item {
})
},
"forgot": function(button) {}
"forgot": button => {}
}
HRowLayout {