forked from Public/monero-gui
Merge pull request #1794
e650818TextField.onEditingFinished() is not available in Qt versions lower than 5.9. Replace with onEditingFinished() (xmrdsc)b466f9fstring.startsWith() is not available in Qt versions lower than 5.8. Replace with string.indexOf() (xmrdsc)
This commit is contained in:
@@ -452,7 +452,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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user