diff options
author | Dong Rui <dongrui@uniontech.com> | 2020-08-26 13:07:39 +0800 |
---|---|---|
committer | Dong Rui <dongrui@uniontech.com> | 2021-02-23 10:22:42 +0000 |
commit | a363e1e8ea416f72380668f483661cef0b526448 (patch) | |
tree | 8cce378ff00e28bf5b7d47813bc50b05ecd0b3b9 | |
parent | b06c3a0af83a4369257e498b75c183365ec44b5d (diff) |
QLineEdit: Fix editingFinished() not being emitted when pressing the clear button
When pressing the clear button, the editingFinished() signal was not
received when focussing out.
Call _q_textEdited(QString()) when pressing the clear button.
Fixes: QTBUG-83295
Change-Id: Ie4bc6d9a2f27f89163c05c4c15175540c7631a30
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit c5904cb96aed3b171c543a2cf0bed8f8ac5f95c4)
-rw-r--r-- | src/widgets/widgets/qlineedit_p.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp index 1839941036..4143b848b5 100644 --- a/src/widgets/widgets/qlineedit_p.cpp +++ b/src/widgets/widgets/qlineedit_p.cpp @@ -479,7 +479,7 @@ void QLineEditPrivate::_q_clearButtonClicked() Q_Q(QLineEdit); if (!q->text().isEmpty()) { q->clear(); - emit q->textEdited(QString()); + _q_textEdited(QString()); } } |