Add shortcutsOverride in QLineEdit for used shortcuts

QLineEdit uses shortcuts to QKeySequence::DeleteCompleteLine and
QKeySequence::MoveToEndOfLine

These shortcuts were not in the overrideShortcuts which can
cause erratic behavior.

Change-Id: I69e2b00e38d3f0e48a20f91f08a22b3fae9b7c48
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This commit is contained in:
David Edmundson 2013-09-15 13:55:03 +00:00 committed by The Qt Project
parent 6621188515
commit 0b1e30aee4

View File

@ -1525,6 +1525,7 @@ void QWidgetLineControl::processShortcutOverrideEvent(QKeyEvent *ke)
|| ke == QKeySequence::Undo
|| ke == QKeySequence::MoveToNextWord
|| ke == QKeySequence::MoveToPreviousWord
|| ke == QKeySequence::MoveToEndOfLine
|| ke == QKeySequence::MoveToStartOfDocument
|| ke == QKeySequence::MoveToEndOfDocument
|| ke == QKeySequence::SelectNextWord
@ -1535,7 +1536,8 @@ void QWidgetLineControl::processShortcutOverrideEvent(QKeyEvent *ke)
|| ke == QKeySequence::SelectEndOfBlock
|| ke == QKeySequence::SelectStartOfDocument
|| ke == QKeySequence::SelectAll
|| ke == QKeySequence::SelectEndOfDocument) {
|| ke == QKeySequence::SelectEndOfDocument
|| ke == QKeySequence::DeleteCompleteLine) {
ke->accept();
} else if (ke->modifiers() == Qt::NoModifier || ke->modifiers() == Qt::ShiftModifier
|| ke->modifiers() == Qt::KeypadModifier) {