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

@@ -211,9 +211,6 @@ public:
void setActionHack(QObject *hack);
QObject *actionHack() const;
void setTextCodec(QTextCodec *codec);
QTextCodec *textCodec() const;
void setReadOnly(bool b);
void setTextCursor(const QTextCursor &cursor);
@@ -640,9 +637,6 @@ public:
QString contextHelpId() const; // from IContext
void setTextCodec(QTextCodec *codec, TextCodecReason = TextCodecOtherReason) { m_editorWidget->setTextCodec(codec); }
QTextCodec *textCodec() const { return m_editorWidget->textCodec(); }
// ITextEditor
void remove(int length);
void insert(const QString &string);