forked from qt-creator/qt-creator
TextEditor: Merge the two sets of *EditorWidget constructors
Change-Id: I45d87d0be722ac36d64af222f03f8cb76242c9df Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -70,8 +70,8 @@ CMakeEditor::CMakeEditor(CMakeEditorWidget *editor)
|
||||
|
||||
Core::IEditor *CMakeEditor::duplicate()
|
||||
{
|
||||
CMakeEditorWidget *ret = new CMakeEditorWidget(
|
||||
qobject_cast<CMakeEditorWidget *>(editorWidget()));
|
||||
CMakeEditorWidget *ret = new CMakeEditorWidget;
|
||||
ret->setTextDocument(editorWidget()->textDocumentPtr());
|
||||
TextEditor::TextEditorSettings::initializeEditor(ret);
|
||||
return ret->editor();
|
||||
}
|
||||
@@ -150,19 +150,7 @@ QString CMakeEditor::contextHelpId() const
|
||||
// CMakeEditor
|
||||
//
|
||||
|
||||
CMakeEditorWidget::CMakeEditorWidget(QWidget *parent)
|
||||
: BaseTextEditorWidget(new CMakeDocument(), parent)
|
||||
{
|
||||
ctor();
|
||||
}
|
||||
|
||||
CMakeEditorWidget::CMakeEditorWidget(CMakeEditorWidget *other)
|
||||
: BaseTextEditorWidget(other)
|
||||
{
|
||||
ctor();
|
||||
}
|
||||
|
||||
void CMakeEditorWidget::ctor()
|
||||
CMakeEditorWidget::CMakeEditorWidget()
|
||||
{
|
||||
setCodeFoldingSupported(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user