diff options
author | Benjamin Poulain <benjamin.poulain@nokia.com> | 2009-11-26 15:44:08 +0100 |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2009-11-26 16:46:40 +0100 |
commit | bc2b222148648354fe15a6f8da9e01743a1e3e3f (patch) | |
tree | e76b026c32c3189623f9e6a628bfbe54ba16a341 /src/gui/widgets/qlinecontrol.cpp | |
parent | 0cf58948ac9bb9c35835e18a00737c362b08f3c7 (diff) | |
download | qt4-tools-bc2b222148648354fe15a6f8da9e01743a1e3e3f.tar.gz |
On Mac OS X, QLineEdit should handle MoveToStart/EndOfBlock
On Mac OS X, with a QLineEdit, QKeySequence::MoveToStartOfBlock should
move the cursor to the beginning of the input, and
QKeySequence::MoveToEndOfBlock to the end of the block
Same for selection. The shortcuts also had to be updated.
Task-number: QTBUG-4679
Reviewed-by: Olivier Goffart
Diffstat (limited to 'src/gui/widgets/qlinecontrol.cpp')
-rw-r--r-- | src/gui/widgets/qlinecontrol.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index 9d533ae0a6..06ef1dbfe8 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -1581,16 +1581,16 @@ void QLineControl::processKeyEvent(QKeyEvent* event) } } #endif //QT_NO_CLIPBOARD - else if (event == QKeySequence::MoveToStartOfLine) { + else if (event == QKeySequence::MoveToStartOfLine || event == QKeySequence::MoveToStartOfBlock) { home(0); } - else if (event == QKeySequence::MoveToEndOfLine) { + else if (event == QKeySequence::MoveToEndOfLine || event == QKeySequence::MoveToEndOfBlock) { end(0); } - else if (event == QKeySequence::SelectStartOfLine) { + else if (event == QKeySequence::SelectStartOfLine || event == QKeySequence::SelectStartOfBlock) { home(1); } - else if (event == QKeySequence::SelectEndOfLine) { + else if (event == QKeySequence::SelectEndOfLine || event == QKeySequence::SelectEndOfBlock) { end(1); } else if (event == QKeySequence::MoveToNextChar) { |