forked from qt-creator/qt-creator
Editors: Remove useless parent widget argument from create/duplicate
It was never called with a sensible value anyhow, and only complicates things. Change-Id: I005848700b6c00114d91495670d4a0e15a2d2e64 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -581,9 +581,9 @@ QModelIndex QmlJSTextEditorWidget::outlineModelIndex()
|
||||
return m_outlineModelIndex;
|
||||
}
|
||||
|
||||
IEditor *QmlJSEditor::duplicate(QWidget *parent)
|
||||
IEditor *QmlJSEditor::duplicate()
|
||||
{
|
||||
QmlJSTextEditorWidget *newEditor = new QmlJSTextEditorWidget(parent);
|
||||
QmlJSTextEditorWidget *newEditor = new QmlJSTextEditorWidget();
|
||||
newEditor->duplicateFrom(editorWidget());
|
||||
TextEditor::TextEditorSettings::initializeEditor(newEditor);
|
||||
return newEditor->editor();
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
explicit QmlJSEditor(QmlJSTextEditorWidget *);
|
||||
|
||||
bool duplicateSupported() const { return true; }
|
||||
Core::IEditor *duplicate(QWidget *parent);
|
||||
Core::IEditor *duplicate();
|
||||
Core::Id id() const;
|
||||
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
|
||||
bool isDesignModePreferred() const;
|
||||
|
||||
@@ -62,9 +62,9 @@ QmlJSEditorFactory::QmlJSEditorFactory(QObject *parent)
|
||||
|
||||
}
|
||||
|
||||
Core::IEditor *QmlJSEditorFactory::createEditor(QWidget *parent)
|
||||
Core::IEditor *QmlJSEditorFactory::createEditor()
|
||||
{
|
||||
QmlJSTextEditorWidget *rc = new QmlJSTextEditorWidget(parent);
|
||||
QmlJSTextEditorWidget *rc = new QmlJSTextEditorWidget();
|
||||
TextEditor::TextEditorSettings::initializeEditor(rc);
|
||||
return rc->editor();
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ class QmlJSEditorFactory : public Core::IEditorFactory
|
||||
public:
|
||||
QmlJSEditorFactory(QObject *parent);
|
||||
|
||||
Core::IEditor *createEditor(QWidget *parent);
|
||||
Core::IEditor *createEditor();
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user