Merge pull request #1794

e650818 TextField.onEditingFinished() is not available in Qt versions lower than 5.9. Replace with onEditingFinished() (xmrdsc)
b466f9f string.startsWith() is not available in Qt versions lower than 5.8. Replace with string.indexOf() (xmrdsc)
This commit is contained in:
luigi1111 2018-12-11 13:59:03 -06:00
commit f8cd4c86d9
No known key found for this signature in database
GPG key ID: F4ACA0183641E010
3 changed files with 3 additions and 3 deletions

View file

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

View file

@ -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;
}
}

View file

@ -385,7 +385,7 @@ ColumnLayout {
color: "#4A4949"
text: persistentSettings.kdfRounds
validator: IntValidator { bottom: 1 }
onTextEdited: {
onEditingFinished: {
kdfRoundsText.text = persistentSettings.kdfRounds = parseInt(kdfRoundsText.text) >= 1 ? parseInt(kdfRoundsText.text) : 1;
}
}