summaryrefslogtreecommitdiff
path: root/src/controls/Private/TextInputWithHandles.qml
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2014-08-19 13:16:45 +0200
committerJ-P Nurmi <jpnurmi@digia.com>2014-09-11 17:29:09 +0200
commit080d028c99df0f313f7dddf25da4843dabd57ef5 (patch)
treeb991fc2bfe94e2af2005b7adaf4bda4735f592b1 /src/controls/Private/TextInputWithHandles.qml
parent16216d2484492031542e85ae8d73f94f487aba8f (diff)
downloadqtquickcontrols-080d028c99df0f313f7dddf25da4843dabd57ef5.tar.gz
TextSingleton: implement API for getting current item with selection
On some platforms (iOS) you can select text without giving focus to the input. To be able to clear selection from other parts of the code (iOS will only let one input have selection at a time), we need to track this. Later patches will make use of it. Change-Id: I4689253b439e0a86349e53c2edf2554fc96225f8 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/controls/Private/TextInputWithHandles.qml')
-rw-r--r--src/controls/Private/TextInputWithHandles.qml2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/controls/Private/TextInputWithHandles.qml b/src/controls/Private/TextInputWithHandles.qml
index cace83f6..59ba971e 100644
--- a/src/controls/Private/TextInputWithHandles.qml
+++ b/src/controls/Private/TextInputWithHandles.qml
@@ -38,6 +38,7 @@
**
****************************************************************************/
import QtQuick 2.2
+import QtQuick.Controls.Private 1.0
TextInput {
id: input
@@ -71,6 +72,7 @@ TextInput {
selectionHandle.position = (selectionStart !== cursorPosition) ? selectionStart : selectionEnd
blockRecursion = false
}
+ TextSingleton.updateSelectionItem(input)
}
function activate() {