Editor: Add feature for set/unset UTF-8 BOM

Change-Id: Iec7e36b1d7a526d7fa8a8096110b91f9c4cc44f9
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Yuchen Deng
2012-03-02 08:16:23 +08:00
committed by Eike Ziller
parent a2d3d7f3bf
commit 012ff2d22a
7 changed files with 35 additions and 0 deletions

View File

@@ -65,6 +65,7 @@ TextEditorActionHandler::TextEditorActionHandler(const char *context,
m_cutAction(0),
m_pasteAction(0),
m_circularPasteAction(0),
m_switchUtf8bomAction(0),
m_selectAllAction(0),
m_gotoAction(0),
m_printAction(0),
@@ -379,6 +380,11 @@ void TextEditorActionHandler::createActions()
connect(m_circularPasteAction, SIGNAL(triggered()), this, SLOT(circularPasteAction()));
medit->addAction(command, Core::Constants::G_EDIT_COPYPASTE);
m_switchUtf8bomAction = new QAction(this);
m_modifyingActions << m_switchUtf8bomAction;
command = am->registerAction(m_switchUtf8bomAction, Constants::SWITCH_UTF8BOM, m_contextId, true);
connect(m_switchUtf8bomAction, SIGNAL(triggered()), this, SLOT(switchUtf8bomAction()));
m_indentAction = new QAction(tr("Indent"), this);
m_modifyingActions << m_indentAction;
command = am->registerAction(m_indentAction, Constants::INDENT, m_contextId, true);
@@ -589,6 +595,7 @@ FUNCTION2(copyAction, copy)
FUNCTION2(cutAction, cut)
FUNCTION2(pasteAction, paste)
FUNCTION2(circularPasteAction, circularPaste)
FUNCTION2(switchUtf8bomAction, switchUtf8bom)
FUNCTION2(formatAction, format)
FUNCTION2(rewrapParagraphAction, rewrapParagraph)
FUNCTION2(selectAllAction, selectAll)