diff options
author | Rainer Keller <rainer.keller@digia.com> | 2014-02-25 10:01:20 +0100 |
---|---|---|
committer | Rainer Keller <rainer.keller@digia.com> | 2014-02-26 09:18:10 +0200 |
commit | 07f65e7e1150b5487bbf9a268fe652cebb3b7570 (patch) | |
tree | 38bd70f1d0629dcba8e1ac7f33e75b5d94ab35b1 | |
parent | b6c311a039f520cf9a681708a5d94d2034b4b1a9 (diff) |
Merge updates from upstream into keyboard example
Change-Id: I0b48f285e63f88788ca6015a1d7a53edaccd35b8
Reviewed-by: Kalle Viironen <kalle.viironen@digia.com>
-rw-r--r-- | basicsuite/textinput/TextArea.qml | 6 | ||||
-rw-r--r-- | basicsuite/textinput/TextBase.qml | 4 | ||||
-rw-r--r-- | basicsuite/textinput/TextField.qml | 6 | ||||
-rw-r--r-- | basicsuite/textinput/main.qml | 4 |
4 files changed, 3 insertions, 17 deletions
diff --git a/basicsuite/textinput/TextArea.qml b/basicsuite/textinput/TextArea.qml index 490e066..6832356 100644 --- a/basicsuite/textinput/TextArea.qml +++ b/basicsuite/textinput/TextArea.qml @@ -77,12 +77,6 @@ TextBase { selectionColor: Qt.rgba(1.0, 1.0, 1.0, 0.5) selectedTextColor: Qt.rgba(0.0, 0.0, 0.0, 0.8) anchors { left: parent.left; right: parent.right; margins: 12 } - cursorDelegate: Rectangle { - width: 2 - opacity: 0.7 - color: "#EEEEEE" - visible: textEdit.activeFocus - } onActiveFocusChanged: if (!activeFocus) deselect() } diff --git a/basicsuite/textinput/TextBase.qml b/basicsuite/textinput/TextBase.qml index 67ee3e3..916b3e2 100644 --- a/basicsuite/textinput/TextBase.qml +++ b/basicsuite/textinput/TextBase.qml @@ -49,7 +49,7 @@ FocusScope { property int fontPixelSize: 32 property string previewText property string enterKeyText - property bool enterKeyEnabled: true + property bool enterKeyEnabled: enterKeyText.length === 0 || editor.text.length > 0 || editor.inputMethodComposing property alias mouseParent: mouseArea.parent implicitHeight: editor.height + 12 @@ -86,6 +86,8 @@ FocusScope { parent: textBase anchors.fill: parent onClicked: { + if (editor.inputMethodComposing) + Qt.inputMethod.commit() var positionInEditor = mapToItem(editor, mouseX, mouseY) var cursorPosition = editor.positionAt(positionInEditor.x, positionInEditor.y) editor.cursorPosition = cursorPosition diff --git a/basicsuite/textinput/TextField.qml b/basicsuite/textinput/TextField.qml index 9b01418..e95ded7 100644 --- a/basicsuite/textinput/TextField.qml +++ b/basicsuite/textinput/TextField.qml @@ -82,12 +82,6 @@ TextBase { selectionColor: Qt.rgba(1.0, 1.0, 1.0, 0.5) selectedTextColor: Qt.rgba(0.0, 0.0, 0.0, 0.8) width: Math.max(flickable.width, implicitWidth)-2 - cursorDelegate: Rectangle { - width: 2 - opacity: 0.7 - color: "#EEEEEE" - visible: textInput.activeFocus - } onActiveFocusChanged: if (!activeFocus) deselect() } } diff --git a/basicsuite/textinput/main.qml b/basicsuite/textinput/main.qml index c6bcda9..2b9caef 100644 --- a/basicsuite/textinput/main.qml +++ b/basicsuite/textinput/main.qml @@ -77,7 +77,6 @@ Flickable { width: parent.width previewText: "One line field" enterKeyText: "Next" - enterKeyEnabled: text.length > 0 onEnterKeyClicked: passwordField.focus = true } TextField { @@ -88,7 +87,6 @@ Flickable { previewText: "Password field" inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhPreferLowercase | Qt.ImhSensitiveData | Qt.ImhNoPredictiveText enterKeyText: "Next" - enterKeyEnabled: text.length > 0 onEnterKeyClicked: phoneField.focus = true } TextField { @@ -99,7 +97,6 @@ Flickable { previewText: "Phone number field" inputMethodHints: Qt.ImhDialableCharactersOnly enterKeyText: "Next" - enterKeyEnabled: text.length > 0 onEnterKeyClicked: numberField.focus = true } TextField { @@ -110,7 +107,6 @@ Flickable { previewText: "Decimal number field" inputMethodHints: Qt.ImhFormattedNumbersOnly enterKeyText: "Next" - enterKeyEnabled: text.length > 0 onEnterKeyClicked: textArea.focus = true } TextArea { |