Commit 6d72796e authored by Eike Ziller's avatar Eike Ziller

ProFileEditor: Remove unused factory variable

Change-Id: Ifa20cc17675dfce1da9b087ee2e9b2ecdb3d8f22
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent a3608f59
......@@ -61,8 +61,7 @@ ProFileEditor::ProFileEditor(ProFileEditorWidget *editor)
Core::IEditor *ProFileEditor::duplicate()
{
ProFileEditorWidget *ret = new ProFileEditorWidget(
qobject_cast<ProFileEditorWidget*>(editorWidget())->factory());
ProFileEditorWidget *ret = new ProFileEditorWidget();
ret->duplicateFrom(editorWidget());
TextEditor::TextEditorSettings::initializeEditor(ret);
return ret->editor();
......@@ -82,8 +81,8 @@ TextEditor::CompletionAssistProvider *ProFileEditor::completionAssistProvider()
// ProFileEditorWidget
//
ProFileEditorWidget::ProFileEditorWidget(ProFileEditorFactory *factory, QWidget *parent)
: BaseTextEditorWidget(new ProFileDocument(), parent), m_factory(factory)
ProFileEditorWidget::ProFileEditorWidget(QWidget *parent)
: BaseTextEditorWidget(new ProFileDocument(), parent)
{
baseTextDocument()->setSyntaxHighlighter(new ProFileHighlighter);
m_commentDefinition.clearCommentStyles();
......
......@@ -58,9 +58,7 @@ class ProFileEditorWidget : public TextEditor::BaseTextEditorWidget
Q_OBJECT
public:
ProFileEditorWidget(ProFileEditorFactory *factory, QWidget *parent = 0);
ProFileEditorFactory *factory() { return m_factory; }
ProFileEditorWidget(QWidget *parent = 0);
void unCommentSelection();
......@@ -71,7 +69,6 @@ protected:
void contextMenuEvent(QContextMenuEvent *);
private:
ProFileEditorFactory *m_factory;
Utils::CommentDefinition m_commentDefinition;
};
......
......@@ -62,7 +62,7 @@ ProFileEditorFactory::ProFileEditorFactory(QmakeManager *manager) :
Core::IEditor *ProFileEditorFactory::createEditor()
{
ProFileEditorWidget *editor = new ProFileEditorWidget(this);
ProFileEditorWidget *editor = new ProFileEditorWidget;
TextEditor::TextEditorSettings::initializeEditor(editor);
return editor->editor();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment