forked from qt-creator/qt-creator
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:
@@ -5837,17 +5837,6 @@ void BaseTextEditorWidget::unfoldAll()
|
||||
centerCursor();
|
||||
}
|
||||
|
||||
void BaseTextEditorWidget::setTextCodec(QTextCodec *codec)
|
||||
{
|
||||
baseTextDocument()->setCodec(codec);
|
||||
}
|
||||
|
||||
QTextCodec *BaseTextEditorWidget::textCodec() const
|
||||
{
|
||||
// TODO: Fix all QTextCodec usages to be const *.
|
||||
return const_cast<QTextCodec *>(baseTextDocument()->codec());
|
||||
}
|
||||
|
||||
void BaseTextEditorWidget::setReadOnly(bool b)
|
||||
{
|
||||
QPlainTextEdit::setReadOnly(b);
|
||||
|
||||
Reference in New Issue
Block a user