string.startsWith() is not available in Qt versions lower than 5.8. Replace with string.indexOf()

pull/2/head
dsc 6 years ago
parent e650818016
commit b466f9fe96
No known key found for this signature in database
GPG Key ID: 7BBC83D7A8810AAB

@ -453,7 +453,7 @@ Rectangle {
fontBold: true
inlineIcon: true
onTextChanged: {
if (amountToReceiveLine.text.startsWith('.')) {
if(amountToReceiveLine.text.indexOf('.') === 0){
amountToReceiveLine.text = '0' + amountToReceiveLine.text;
}
}

@ -145,7 +145,7 @@ Rectangle {
inlineButtonText: qsTr("All") + translationManager.emptyString
inlineButton.onClicked: amountLine.text = "(all)"
onTextChanged: {
if (amountLine.text.startsWith('.')) {
if(amountLine.text.indexOf('.') === 0){
amountLine.text = '0' + amountLine.text;
}
}