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
commit2596946398c3a97459b304f34ad73fc9944db1ae (patch)
tree2b329b9c567f6957f0d48138242d7ea06a09f040
parent67e8983443859802372d0b30219bab967a44501a (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]
}