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:
@@ -64,8 +64,8 @@ ProFileEditor::ProFileEditor(ProFileEditorWidget *editor)
|
||||
|
||||
Core::IEditor *ProFileEditor::duplicate()
|
||||
{
|
||||
ProFileEditorWidget *ret = new ProFileEditorWidget(
|
||||
qobject_cast<ProFileEditorWidget*>(editorWidget()));
|
||||
ProFileEditorWidget *ret = new ProFileEditorWidget;
|
||||
ret->setTextDocument(editorWidget()->textDocumentPtr());
|
||||
TextEditor::TextEditorSettings::initializeEditor(ret);
|
||||
return ret->editor();
|
||||
}
|
||||
@@ -74,12 +74,7 @@ Core::IEditor *ProFileEditor::duplicate()
|
||||
// ProFileEditorWidget
|
||||
//
|
||||
|
||||
ProFileEditorWidget::ProFileEditorWidget(QWidget *parent)
|
||||
: BaseTextEditorWidget(new ProFileDocument(), parent)
|
||||
{}
|
||||
|
||||
ProFileEditorWidget::ProFileEditorWidget(ProFileEditorWidget *other)
|
||||
: BaseTextEditorWidget(other)
|
||||
ProFileEditorWidget::ProFileEditorWidget()
|
||||
{}
|
||||
|
||||
static bool isValidFileNameChar(const QChar &c)
|
||||
|
||||
Reference in New Issue
Block a user