diff options
author | Kostas Karanikolas <kostas@quadra> | 2010-11-27 14:02:20 +0900 |
---|---|---|
committer | Leandro Melo <leandro.melo@nokia.com> | 2011-03-17 10:51:46 +0100 |
commit | 8ae4317394a3cb7acd085fee78c0c348d4e7ceb4 (patch) | |
tree | d656da2c044d295fab14655d66dc6527ee95c6f9 /src/plugins/texteditor/basetexteditor.cpp | |
parent | 420345380ab9baaa2c7e548512d7d7bb5c09722f (diff) | |
download | qt-creator-8ae4317394a3cb7acd085fee78c0c348d4e7ceb4.tar.gz |
Added "Copy Line" keyboard command and associated action
Merge-request: 223
Reviewed-by: Leandro Melo
Diffstat (limited to 'src/plugins/texteditor/basetexteditor.cpp')
-rw-r--r-- | src/plugins/texteditor/basetexteditor.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index af61f7275b..dfc0cc5b3a 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -5031,6 +5031,15 @@ void BaseTextEditorWidget::cutLine() cut(); } +// control+shift+insert +void BaseTextEditorWidget::copyLine() +{ + QTextCursor prevCursor = textCursor(); + maybeSelectLine(); + copy(); + setTextCursor(prevCursor); +} + void BaseTextEditorWidget::deleteLine() { maybeSelectLine(); |