TextEditor: Further *Editor/*EditorWidget disentangling

In most cases, the *Editor constructor does not need to
access the *EditorWidget.

Change-Id: I1f5c076a0f723d5d82b398e8c250c7bd1d47eb17
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
hjk
2014-08-19 00:54:45 +02:00
parent d2ec7d80d9
commit c5fae0e8da
34 changed files with 77 additions and 99 deletions

View File

@@ -71,16 +71,6 @@ using namespace TextEditor;
namespace DiffEditor {
class UnifiedDiffEditor : public BaseTextEditor
{
Q_OBJECT
public:
UnifiedDiffEditor(BaseTextEditorWidget *editorWidget)
: BaseTextEditor(editorWidget) {
document()->setId("DiffEditor.UnifiedDiffEditor");
}
};
UnifiedDiffEditorWidget::UnifiedDiffEditorWidget(QWidget *parent)
: SelectableTextEditorWidget(parent)
, m_guiController(0)
@@ -389,7 +379,7 @@ void UnifiedDiffEditorWidget::patch(int diffFileIndex, int chunkIndex, bool reve
TextEditor::BaseTextEditor *UnifiedDiffEditorWidget::createEditor()
{
return new UnifiedDiffEditor(this);
return new BaseTextEditor;
}
void UnifiedDiffEditorWidget::clear(const QString &message)
@@ -844,5 +834,3 @@ void UnifiedDiffEditorWidget::setCurrentDiffFileIndex(int diffFileIndex)
}
} // namespace DiffEditor
#include "unifieddiffeditorwidget.moc"