summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor/basetexteditor.cpp
diff options
context:
space:
mode:
authorKostas Karanikolas <kostas@quadra>2010-11-27 14:02:20 +0900
committerLeandro Melo <leandro.melo@nokia.com>2011-03-17 10:51:46 +0100
commit8ae4317394a3cb7acd085fee78c0c348d4e7ceb4 (patch)
treed656da2c044d295fab14655d66dc6527ee95c6f9 /src/plugins/texteditor/basetexteditor.cpp
parent420345380ab9baaa2c7e548512d7d7bb5c09722f (diff)
downloadqt-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.cpp9
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();