From 7007150706263634336eb0d76be101c1c4d17269 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Tue, 28 Feb 2017 17:04:28 +0100 Subject: [PATCH] feat(ui/modules/Common/Form/Fields/HexField): supports `a-f` --- .../ui/modules/Common/Form/Fields/HexField.qml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/linphone-desktop/ui/modules/Common/Form/Fields/HexField.qml b/linphone-desktop/ui/modules/Common/Form/Fields/HexField.qml index de8b290a7..0207e85e3 100644 --- a/linphone-desktop/ui/modules/Common/Form/Fields/HexField.qml +++ b/linphone-desktop/ui/modules/Common/Form/Fields/HexField.qml @@ -37,15 +37,12 @@ Item { id: textField validator: RegExpValidator { - regExp: /[0-9A-F]*/ + regExp: /[0-9A-Fa-f]*/ } onEditingFinished: { - if (!text.length) { - text = '0' - } - - wrapper.editingFinished(parseInt(textField.text, 16)) + text = _computeText('0x' + text) + wrapper.editingFinished(parseInt(text, 16)) } } }