Improve Copy/CutLine actions usability

This patch implements two features:
1. Reimplement CopyLine to move text cursor at the beginning of line
2. Add copy/cutLine action to Advanced Edit menu, to make it
   discoverable for editor users.

Change-Id: I0bf336ebee4dbf5afd2c759e47b1830271bd9d18
Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
Frantisek Vacek
2014-02-24 12:08:39 +01:00
committed by David Schulz
parent f3973ebcfd
commit fa998d2d2c
4 changed files with 13 additions and 6 deletions

View File

@@ -136,12 +136,6 @@ void TextEditorActionHandler::createActions()
SLOT(gotoAction()));
m_printAction = registerAction(PRINT,
SLOT(printAction()));
m_cutLineAction = registerAction(CUT_LINE,
SLOT(cutLine()), true, tr("Cut &Line"),
QKeySequence(tr("Shift+Del")));
m_copyLineAction = registerAction(COPY_LINE,
SLOT(copyLine()), false, tr("Copy &Line"),
QKeySequence(tr("Ctrl+Ins")));
m_deleteLineAction = registerAction(DELETE_LINE,
SLOT(deleteLine()), true, tr("Delete &Line"));
m_deleteEndOfWordAction = registerAction(DELETE_END_OF_WORD,
@@ -241,6 +235,14 @@ void TextEditorActionHandler::createActions()
SLOT(unCommentSelection()), true, tr("Toggle Comment &Selection"),
QKeySequence(tr("Ctrl+/")),
G_EDIT_FORMAT, advancedEditMenu);
m_cutLineAction = registerAction(CUT_LINE,
SLOT(cutLine()), true, tr("Cut &Line"),
QKeySequence(tr("Shift+Del")),
G_EDIT_TEXT, advancedEditMenu);
m_copyLineAction = registerAction(COPY_LINE,
SLOT(copyLine()), false, tr("Copy &Line"),
QKeySequence(tr("Ctrl+Ins")),
G_EDIT_TEXT, advancedEditMenu);
m_foldAction = registerAction(FOLD,
SLOT(fold()), true, tr("Fold"),
QKeySequence(tr("Ctrl+<")),