summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorBenjamin Poulain <benjamin.poulain@nokia.com>2009-11-26 14:44:08 (GMT)
committerBenjamin Poulain <benjamin.poulain@nokia.com>2009-11-26 15:46:40 (GMT)
commitbc2b222148648354fe15a6f8da9e01743a1e3e3f (patch)
treee76b026c32c3189623f9e6a628bfbe54ba16a341 /src/gui/widgets
parent0cf58948ac9bb9c35835e18a00737c362b08f3c7 (diff)
downloadQt-bc2b222148648354fe15a6f8da9e01743a1e3e3f.zip
Qt-bc2b222148648354fe15a6f8da9e01743a1e3e3f.tar.gz
Qt-bc2b222148648354fe15a6f8da9e01743a1e3e3f.tar.bz2
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')
-rw-r--r--src/gui/widgets/qlinecontrol.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index 9d533ae..06ef1db 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) {