diff options
author | Liang Qi <liang.qi@qt.io> | 2019-12-10 13:51:40 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-12-10 13:51:40 +0200 |
commit | 90210d5d9c4029057035019f144212922494ff0a (patch) | |
tree | 1aacefa57786964d47a200791280ae91c9b825da /src/widgets/widgets/qwidgettextcontrol.cpp | |
parent | c69a2448ab129d88411a4778f2350dcf971dc623 (diff) | |
parent | 5231c26a82a7056f98d99643850754d4e1ebe417 (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
tests/auto/network/kernel/qnetworkinterface/BLACKLIST
Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
Diffstat (limited to 'src/widgets/widgets/qwidgettextcontrol.cpp')
-rw-r--r-- | src/widgets/widgets/qwidgettextcontrol.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp index 0b3c30312d..bb28db7fac 100644 --- a/src/widgets/widgets/qwidgettextcontrol.cpp +++ b/src/widgets/widgets/qwidgettextcontrol.cpp @@ -1283,6 +1283,8 @@ void QWidgetTextControlPrivate::keyPressEvent(QKeyEvent *e) } else { QTextCursor localCursor = cursor; localCursor.deletePreviousChar(); + if (cursor.d) + cursor.d->setX(); } goto accept; } @@ -1322,9 +1324,13 @@ void QWidgetTextControlPrivate::keyPressEvent(QKeyEvent *e) else if (e == QKeySequence::Delete) { QTextCursor localCursor = cursor; localCursor.deleteChar(); + if (cursor.d) + cursor.d->setX(); } else if (e == QKeySequence::Backspace) { QTextCursor localCursor = cursor; localCursor.deletePreviousChar(); + if (cursor.d) + cursor.d->setX(); }else if (e == QKeySequence::DeleteEndOfWord) { if (!cursor.hasSelection()) cursor.movePosition(QTextCursor::NextWord, QTextCursor::KeepAnchor); |