TextEditors: Remove useless duplicated (set)textCodec methods

They are duplicated from TextDocument::(set)codec. The default
implementation of the duplicated methods was just delegating to the text
document. The override of setTextCodec in QmlJsEditor was useless, since
it was only called from EditorConfiguration::configureEditor with the
ITextEditor::TextCodecFromProjectSetting flag anyhow, which made the
overridden method in QmlJsEditor be the same as the fallback.
Aside from that, the duplicated methods wouldn't have belonged to the
*editor* anyhow, but to the document.

Change-Id: Ib43c28210b6bf88726159d751a4905a1d062f80e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Eike Ziller
2013-07-16 17:10:16 +02:00
parent fade19a9bf
commit 7808266fca
8 changed files with 5 additions and 39 deletions

View File

@@ -60,13 +60,6 @@ bool QmlJSEditor::isDesignModePreferred() const
return false;
}
void QmlJSEditor::setTextCodec(QTextCodec *codec, TextCodecReason reason)
{
if (reason != TextCodecOtherReason) // qml is defined to be utf8
return;
editorWidget()->setTextCodec(codec);
}
const Utils::CommentDefinition *QmlJSEditor::commentDefinition() const
{
return &m_commentDefinition;