┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/private/kitemlistroleeditor.cpp
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2013-08-25 19:17:25 +0200
committerFrank Reininghaus <[email protected]>2013-08-25 19:17:25 +0200
commitcba24825c973ff422a84a71563ec7bc22c340088 (patch)
treec922d80124e4b0e2df4df206c1d57a8316863f3c /src/kitemviews/private/kitemlistroleeditor.cpp
parentebfcb5e19b345a0fbb2425f537232f45d3b3d62a (diff)
parent092c820023466f5291ba7d52f55a8e7b9939a502 (diff)
Merge remote-tracking branch 'origin/KDE/4.11'
Diffstat (limited to 'src/kitemviews/private/kitemlistroleeditor.cpp')
-rw-r--r--src/kitemviews/private/kitemlistroleeditor.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/kitemviews/private/kitemlistroleeditor.cpp b/src/kitemviews/private/kitemlistroleeditor.cpp
index 9f20afea2..0a48f1ba0 100644
--- a/src/kitemviews/private/kitemlistroleeditor.cpp
+++ b/src/kitemviews/private/kitemlistroleeditor.cpp
@@ -93,6 +93,22 @@ void KItemListRoleEditor::keyPressEvent(QKeyEvent* event)
emitRoleEditingFinished();
event->accept();
return;
+ case Qt::Key_Left:
+ case Qt::Key_Right: {
+ QTextCursor cursor = textCursor();
+ if (event->modifiers() == Qt::NoModifier && cursor.hasSelection()) {
+ if (event->key() == Qt::Key_Left) {
+ cursor.setPosition(cursor.selectionStart());
+ } else {
+ cursor.setPosition(cursor.selectionEnd());
+ }
+ cursor.clearSelection();
+ setTextCursor(cursor);
+ event->accept();
+ return;
+ }
+ break;
+ }
default:
break;
}