forked from qt-creator/qt-creator
Get rid of DiffEditor::editorWidget();
Change-Id: I3078002359871dad74d4a07924d5beeaeb9f82ba Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -85,6 +85,11 @@ Core::Id DiffEditor::id() const
|
||||
return Constants::DIFF_EDITOR_ID;
|
||||
}
|
||||
|
||||
QTextCodec *DiffEditor::codec() const
|
||||
{
|
||||
return m_editorWidget->codec();
|
||||
}
|
||||
|
||||
static QToolBar *createToolBar(const QWidget *someWidget)
|
||||
{
|
||||
// Create
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
|
||||
Core::IDocument *document();
|
||||
Core::Id id() const;
|
||||
DiffEditorWidget *editorWidget() const { return m_editorWidget; }
|
||||
QTextCodec *codec() const;
|
||||
|
||||
QWidget *toolBar();
|
||||
|
||||
|
||||
@@ -109,10 +109,10 @@ void DiffEditorPlugin::diff()
|
||||
|
||||
Core::EditorManager::activateEditor(editor);
|
||||
|
||||
DiffEditorWidget *editorWidget = editor->editorWidget();
|
||||
QTextCodec *codec = editor->codec();
|
||||
|
||||
const QString text1 = getFileContents(fileName1, editorWidget->codec());
|
||||
const QString text2 = getFileContents(fileName2, editorWidget->codec());
|
||||
const QString text1 = getFileContents(fileName1, codec);
|
||||
const QString text2 = getFileContents(fileName2, codec);
|
||||
|
||||
DiffEditorWidget::DiffFilesContents dfc;
|
||||
dfc.leftFileInfo = fileName1;
|
||||
|
||||
Reference in New Issue
Block a user