Browse Source

qml: WCHaveMasterKey: (fix) re-verify text in onTextChanged

fixes https://github.com/spesmilo/electrum/issues/8853

This is a bit ugly, but activeFocus is declared as final and cannot be overridden directly...
```
  1.42 | W | gui.qml.qeapp | file:///home/user/wspace/electrum/electrum/gui/qml/components/controls/ElTextArea.qml:23:5: Cannot override FINAL property
```
master
SomberNight 2 years ago
parent
commit
67b57da402
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 1
      electrum/gui/qml/components/controls/ElTextArea.qml
  2. 3
      electrum/gui/qml/components/wizard/WCHaveMasterKey.qml

1
electrum/gui/qml/components/controls/ElTextArea.qml

@ -19,6 +19,7 @@ Flickable {
property alias inputMethodHints: edit.inputMethodHints
property alias placeholderText: edit.placeholderText
property alias color: edit.color
readonly property bool anyActiveFocus: activeFocus || edit.activeFocus
contentWidth: rootpane.width
contentHeight: rootpane.height

3
electrum/gui/qml/components/wizard/WCHaveMasterKey.qml

@ -129,8 +129,9 @@ WizardComponent {
font.family: FixedFont
wrapMode: TextEdit.WrapAnywhere
onTextChanged: {
if (activeFocus)
if (anyActiveFocus) {
verifyMasterKey(text)
}
}
inputMethodHints: Qt.ImhSensitiveData | Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase
background: PaneInsetBackground {

Loading…
Cancel
Save