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:
@@ -65,10 +65,10 @@ CMakeEditor::CMakeEditor(CMakeEditorWidget *editor)
|
||||
connect(document(), SIGNAL(changed()), this, SLOT(markAsChanged()));
|
||||
}
|
||||
|
||||
Core::IEditor *CMakeEditor::duplicate(QWidget *parent)
|
||||
Core::IEditor *CMakeEditor::duplicate()
|
||||
{
|
||||
CMakeEditorWidget *w = qobject_cast<CMakeEditorWidget*>(widget());
|
||||
CMakeEditorWidget *ret = new CMakeEditorWidget(parent, w->factory());
|
||||
CMakeEditorWidget *ret = new CMakeEditorWidget(w->factory());
|
||||
ret->duplicateFrom(w);
|
||||
TextEditor::TextEditorSettings::initializeEditor(ret);
|
||||
return ret->editor();
|
||||
@@ -116,7 +116,7 @@ void CMakeEditor::build()
|
||||
// CMakeEditor
|
||||
//
|
||||
|
||||
CMakeEditorWidget::CMakeEditorWidget(QWidget *parent, CMakeEditorFactory *factory)
|
||||
CMakeEditorWidget::CMakeEditorWidget(CMakeEditorFactory *factory, QWidget *parent)
|
||||
: BaseTextEditorWidget(parent), m_factory(factory)
|
||||
{
|
||||
QSharedPointer<CMakeDocument> doc(new CMakeDocument);
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
CMakeEditor(CMakeEditorWidget *);
|
||||
|
||||
bool duplicateSupported() const { return true; }
|
||||
Core::IEditor *duplicate(QWidget *parent);
|
||||
Core::IEditor *duplicate();
|
||||
Core::Id id() const;
|
||||
TextEditor::CompletionAssistProvider *completionAssistProvider();
|
||||
|
||||
@@ -71,7 +71,7 @@ class CMakeEditorWidget : public TextEditor::BaseTextEditorWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CMakeEditorWidget(QWidget *parent, CMakeEditorFactory *factory);
|
||||
CMakeEditorWidget(CMakeEditorFactory *factory, QWidget *parent = 0);
|
||||
|
||||
bool save(const QString &fileName = QString());
|
||||
|
||||
|
||||
@@ -69,9 +69,9 @@ CMakeEditorFactory::CMakeEditorFactory(CMakeManager *manager)
|
||||
contextMenu->addAction(cmd);
|
||||
}
|
||||
|
||||
Core::IEditor *CMakeEditorFactory::createEditor(QWidget *parent)
|
||||
Core::IEditor *CMakeEditorFactory::createEditor()
|
||||
{
|
||||
CMakeEditorWidget *rc = new CMakeEditorWidget(parent, this);
|
||||
CMakeEditorWidget *rc = new CMakeEditorWidget(this);
|
||||
TextEditor::TextEditorSettings::initializeEditor(rc);
|
||||
return rc->editor();
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class CMakeEditorFactory : public Core::IEditorFactory
|
||||
|
||||
public:
|
||||
CMakeEditorFactory(CMakeManager *parent);
|
||||
Core::IEditor *createEditor(QWidget *parent);
|
||||
Core::IEditor *createEditor();
|
||||
|
||||
private:
|
||||
const QStringList m_mimeTypes;
|
||||
|
||||
Reference in New Issue
Block a user