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

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) ...@@ -61,8 +61,7 @@ ProFileEditor::ProFileEditor(ProFileEditorWidget *editor)
Core::IEditor *ProFileEditor::duplicate() Core::IEditor *ProFileEditor::duplicate()
{ {
ProFileEditorWidget *ret = new ProFileEditorWidget( ProFileEditorWidget *ret = new ProFileEditorWidget();
qobject_cast<ProFileEditorWidget*>(editorWidget())->factory());
ret->duplicateFrom(editorWidget()); ret->duplicateFrom(editorWidget());
TextEditor::TextEditorSettings::initializeEditor(ret); TextEditor::TextEditorSettings::initializeEditor(ret);
return ret->editor(); return ret->editor();
...@@ -82,8 +81,8 @@ TextEditor::CompletionAssistProvider *ProFileEditor::completionAssistProvider() ...@@ -82,8 +81,8 @@ TextEditor::CompletionAssistProvider *ProFileEditor::completionAssistProvider()
// ProFileEditorWidget // ProFileEditorWidget
// //
ProFileEditorWidget::ProFileEditorWidget(ProFileEditorFactory *factory, QWidget *parent) ProFileEditorWidget::ProFileEditorWidget(QWidget *parent)
: BaseTextEditorWidget(new ProFileDocument(), parent), m_factory(factory) : BaseTextEditorWidget(new ProFileDocument(), parent)
{ {
baseTextDocument()->setSyntaxHighlighter(new ProFileHighlighter); baseTextDocument()->setSyntaxHighlighter(new ProFileHighlighter);
m_commentDefinition.clearCommentStyles(); m_commentDefinition.clearCommentStyles();
......
...@@ -58,9 +58,7 @@ class ProFileEditorWidget : public TextEditor::BaseTextEditorWidget ...@@ -58,9 +58,7 @@ class ProFileEditorWidget : public TextEditor::BaseTextEditorWidget
Q_OBJECT Q_OBJECT
public: public:
ProFileEditorWidget(ProFileEditorFactory *factory, QWidget *parent = 0); ProFileEditorWidget(QWidget *parent = 0);
ProFileEditorFactory *factory() { return m_factory; }
void unCommentSelection(); void unCommentSelection();
...@@ -71,7 +69,6 @@ protected: ...@@ -71,7 +69,6 @@ protected:
void contextMenuEvent(QContextMenuEvent *); void contextMenuEvent(QContextMenuEvent *);
private: private:
ProFileEditorFactory *m_factory;
Utils::CommentDefinition m_commentDefinition; Utils::CommentDefinition m_commentDefinition;
}; };
......
...@@ -62,7 +62,7 @@ ProFileEditorFactory::ProFileEditorFactory(QmakeManager *manager) : ...@@ -62,7 +62,7 @@ ProFileEditorFactory::ProFileEditorFactory(QmakeManager *manager) :
Core::IEditor *ProFileEditorFactory::createEditor() Core::IEditor *ProFileEditorFactory::createEditor()
{ {
ProFileEditorWidget *editor = new ProFileEditorWidget(this); ProFileEditorWidget *editor = new ProFileEditorWidget;
TextEditor::TextEditorSettings::initializeEditor(editor); TextEditor::TextEditorSettings::initializeEditor(editor);
return editor->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