Introduce a Delete Line action that doesn't copy to clipboard

The version that does copy to clipboard is now called Cut Line, and is
still mapped to Shift+Delete by default.
This commit is contained in:
Thorbjørn Lindeijer
2009-05-14 17:24:35 +02:00
parent 4e7f2f8d7f
commit 9a79a06930
5 changed files with 29 additions and 6 deletions

View File

@@ -72,6 +72,7 @@ TextEditorActionHandler::TextEditorActionHandler(const QString &context,
m_unCollapseAllAction = 0;
m_collapseAction = 0;
m_expandAction = 0;
m_cutLineAction = 0;
m_deleteLineAction = 0;
m_selectEncodingAction = 0;
m_increaseFontSizeAction = 0;
@@ -173,9 +174,13 @@ void TextEditorActionHandler::createActions()
connect(m_unCommentSelectionAction, SIGNAL(triggered()), this, SLOT(unCommentSelection()));
advancedMenu->addAction(command, Core::Constants::G_EDIT_FORMAT);
m_cutLineAction = new QAction(tr("Cut &Line"), this);
command = am->registerAction(m_cutLineAction, Constants::CUT_LINE, m_contextId);
command->setDefaultKeySequence(QKeySequence(tr("Shift+Del")));
connect(m_cutLineAction, SIGNAL(triggered()), this, SLOT(cutLine()));
m_deleteLineAction = new QAction(tr("Delete &Line"), this);
command = am->registerAction(m_deleteLineAction, Constants::DELETE_LINE, m_contextId);
command->setDefaultKeySequence(QKeySequence(tr("Shift+Del")));
connect(m_deleteLineAction, SIGNAL(triggered()), this, SLOT(deleteLine()));
m_collapseAction = new QAction(tr("Collapse"), this);
@@ -385,6 +390,7 @@ FUNCTION2(formatAction, format)
FUNCTION2(selectAllAction, selectAll)
FUNCTION(cleanWhitespace)
FUNCTION(unCommentSelection)
FUNCTION(cutLine)
FUNCTION(deleteLine)
FUNCTION(unCollapseAll)
FUNCTION(collapse)
@@ -416,7 +422,6 @@ void TextEditorActionHandler::updateCurrentEditor(Core::IEditor *editor)
}
}
const QPointer<BaseTextEditor> &TextEditorActionHandler::currentEditor() const
{
return m_currentEditor;