aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-09-28 14:49:59 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-10-06 11:13:38 +0000
commitdcaa66e2fc93a2d98ea2b5475b8d90f899cf1888 (patch)
treefd4410d99d4fc9344e98beb31d79f063f8223d8c
parent732ae8d88488aea6c7b1bf1828c500ae38c1749b (diff)
Doc: use editingFinished signal of TextInput instead of textChanged
The former is only emitted as a result of user interaction, whereas the latter is also emitted as a result of programmatic changes. It's better to use editingFinished(). Change-Id: I71bb084bced6c33d940f550b5e3b2e57df45bd3c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 09b6ac481cc8027c79170706b329f028f33fb9f1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/qml/doc/snippets/code/backend/main.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/doc/snippets/code/backend/main.qml b/src/qml/doc/snippets/code/backend/main.qml
index fadc9cd768..316dea215e 100644
--- a/src/qml/doc/snippets/code/backend/main.qml
+++ b/src/qml/doc/snippets/code/backend/main.qml
@@ -72,7 +72,7 @@ ApplicationWindow {
placeholderText: qsTr("User name")
anchors.centerIn: parent
- onTextChanged: backend.userName = text
+ onEditingFinished: backend.userName = text
}
//![username_input]
}