diff options
author | Liang Qi <liang.qi@qt.io> | 2017-01-25 10:59:12 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-01-25 10:59:12 +0100 |
commit | 85251f9293c0b41178b9c1c8b7c00726a41017a8 (patch) | |
tree | 9167479a97e55f5bd0367abca1d9082b3c03995b /src/virtualkeyboard/content | |
parent | 0371486a32a0e39cdc9d04f9d1245b214d269e3c (diff) | |
parent | 5fe45f3bf60961519b89950e4a91aa14251499fd (diff) |
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
.qmake.conf
src/virtualkeyboard/shifthandler.cpp
Change-Id: I1f95238b9ac5deed3bec6d85f7433cafe219f7ea
Diffstat (limited to 'src/virtualkeyboard/content')
6 files changed, 10 insertions, 14 deletions
diff --git a/src/virtualkeyboard/content/components/AlternativeKeys.qml b/src/virtualkeyboard/content/components/AlternativeKeys.qml index 8801099c..a1fcfe14 100644 --- a/src/virtualkeyboard/content/components/AlternativeKeys.qml +++ b/src/virtualkeyboard/content/components/AlternativeKeys.qml @@ -36,7 +36,6 @@ Item { property alias listView: listView property int keyCode property point origin - property bool uppercased: keyboard.uppercased signal clicked z: 1 @@ -86,7 +85,7 @@ Item { if (active && listView.currentIndex >= 0 && listView.currentIndex < listView.model.count) { var activeKey = listView.model.get(listView.currentIndex) InputContext.inputEngine.virtualKeyClick(keyCode, activeKey.text, - uppercased ? Qt.ShiftModifier : 0) + InputContext.uppercase ? Qt.ShiftModifier : 0) } } @@ -95,7 +94,7 @@ Item { var alternativeKeys = key.effectiveAlternativeKeys if (alternativeKeys.length > 0) { for (var i = 0; i < alternativeKeys.length; i++) { - listModel.append({ "text": uppercased ? alternativeKeys[i].toUpperCase() : alternativeKeys[i] }) + listModel.append({ "text": InputContext.uppercase ? alternativeKeys[i].toUpperCase() : alternativeKeys[i] }) } listView.width = keyboard.style.alternateKeysListItemWidth * listModel.count listView.forceLayout() diff --git a/src/virtualkeyboard/content/components/BaseKey.qml b/src/virtualkeyboard/content/components/BaseKey.qml index 07989e01..5c686adf 100644 --- a/src/virtualkeyboard/content/components/BaseKey.qml +++ b/src/virtualkeyboard/content/components/BaseKey.qml @@ -29,6 +29,7 @@ import QtQuick 2.0 import QtQuick.Layouts 1.0 +import QtQuick.VirtualKeyboard 2.1 /*! \qmltype BaseKey @@ -203,7 +204,7 @@ Item { By default, this property reflects the uppercase status of the keyboard. */ - property bool uppercased: keyboard.uppercased && !noModifier + property bool uppercased: InputContext.uppercase && !noModifier /*! Sets the key panel delegate for the key. diff --git a/src/virtualkeyboard/content/components/CharacterPreviewBubble.qml b/src/virtualkeyboard/content/components/CharacterPreviewBubble.qml index 3a7490aa..1f9a05a2 100644 --- a/src/virtualkeyboard/content/components/CharacterPreviewBubble.qml +++ b/src/virtualkeyboard/content/components/CharacterPreviewBubble.qml @@ -28,6 +28,7 @@ ****************************************************************************/ import QtQuick 2.0 +import QtQuick.VirtualKeyboard 2.1 Item { property bool active @@ -44,7 +45,7 @@ Item { onActiveKeyChanged: { if (activeKey && characterPreview.item !== null) { - characterPreview.item.text = keyboard.uppercased ? activeKey.text.toUpperCase() : activeKey.text + characterPreview.item.text = InputContext.uppercase ? activeKey.text.toUpperCase() : activeKey.text width = activeKey.width height = activeKey.height var position = keyboard.mapFromItem(activeKey, 0, 0) diff --git a/src/virtualkeyboard/content/components/Keyboard.qml b/src/virtualkeyboard/content/components/Keyboard.qml index 27d66d2a..2bb68d3e 100644 --- a/src/virtualkeyboard/content/components/Keyboard.qml +++ b/src/virtualkeyboard/content/components/Keyboard.qml @@ -59,7 +59,6 @@ Item { return "main" } property bool active: Qt.inputMethod.visible - property bool uppercased: InputContext.shift property bool handwritingMode property bool fullScreenHandwritingMode property bool symbolMode @@ -748,7 +747,7 @@ Item { function click(key) { if (key && key.enabled) { if (!key.noKeyEvent) - InputContext.inputEngine.virtualKeyClick(key.key, keyboard.uppercased ? key.text.toUpperCase() : key.text, keyboard.uppercased ? Qt.ShiftModifier : 0) + InputContext.inputEngine.virtualKeyClick(key.key, InputContext.uppercase ? key.text.toUpperCase() : key.text, InputContext.uppercase ? Qt.ShiftModifier : 0) key.clicked() } } diff --git a/src/virtualkeyboard/content/components/ShiftKey.qml b/src/virtualkeyboard/content/components/ShiftKey.qml index b8424a5b..d7705d9f 100644 --- a/src/virtualkeyboard/content/components/ShiftKey.qml +++ b/src/virtualkeyboard/content/components/ShiftKey.qml @@ -48,9 +48,5 @@ BaseKey { highlighted: InputContext.capsLock functionKey: true keyPanelDelegate: keyboard.style ? keyboard.style.shiftKeyPanel : undefined - /*! \internal */ - property bool capsLock: InputContext.capsLock - /*! \internal */ - property bool shift: InputContext.shift onClicked: InputContext.shiftHandler.toggleShift() } diff --git a/src/virtualkeyboard/content/components/WordCandidatePopupList.qml b/src/virtualkeyboard/content/components/WordCandidatePopupList.qml index 5057dfa8..7740cbf9 100644 --- a/src/virtualkeyboard/content/components/WordCandidatePopupList.qml +++ b/src/virtualkeyboard/content/components/WordCandidatePopupList.qml @@ -54,16 +54,16 @@ ListView { Binding { target: wordCandidatePopupList property: "x" - value: Qt.inputMethod.cursorRectangle.x - + value: Math.round(Qt.inputMethod.cursorRectangle.x - (wordCandidatePopupList.currentItem ? (wordCandidatePopupList.currentItem.hasOwnProperty("cursorAnchor") ? - wordCandidatePopupList.currentItem.cursorAnchor : wordCandidatePopupList.currentItem.width) : 0) + wordCandidatePopupList.currentItem.cursorAnchor : wordCandidatePopupList.currentItem.width) : 0)) when: wordCandidatePopupList.visible } Binding { target: wordCandidatePopupList property: "y" - value: wordCandidatePopupList.flipVertical ? Qt.inputMethod.cursorRectangle.y - wordCandidatePopupList.height : Qt.inputMethod.cursorRectangle.y + Qt.inputMethod.cursorRectangle.height + value: Math.round(wordCandidatePopupList.flipVertical ? Qt.inputMethod.cursorRectangle.y - wordCandidatePopupList.height : Qt.inputMethod.cursorRectangle.y + Qt.inputMethod.cursorRectangle.height) when: wordCandidatePopupList.visible } orientation: ListView.Vertical |