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
3 changed files with 3 additions and 3 deletions

View File

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

View File

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

View File

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