From b466f9fe969a5442b7a301ecbf9a6f43afd4352d Mon Sep 17 00:00:00 2001 From: dsc Date: Sun, 9 Dec 2018 14:55:04 +0100 Subject: [PATCH] string.startsWith() is not available in Qt versions lower than 5.8. Replace with string.indexOf() --- pages/Receive.qml | 2 +- pages/Transfer.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/Receive.qml b/pages/Receive.qml index 61403936..047a57c7 100644 --- a/pages/Receive.qml +++ b/pages/Receive.qml @@ -453,7 +453,7 @@ Rectangle { fontBold: true inlineIcon: true onTextChanged: { - if (amountToReceiveLine.text.startsWith('.')) { + if(amountToReceiveLine.text.indexOf('.') === 0){ amountToReceiveLine.text = '0' + amountToReceiveLine.text; } } diff --git a/pages/Transfer.qml b/pages/Transfer.qml index 3207e432..f766bc72 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -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; } }