forked from qt-creator/qt-creator
TextEditor: Fix failure in cpptools autotest
The issue only appeared in the test due to the different editor construction there. Now use the same factory access. Change-Id: I3a8534fbe683bb88f04ad68850cecdfe32b11433 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -70,7 +70,6 @@ static TextEditorPlugin *m_instance = 0;
|
||||
|
||||
TextEditorPlugin::TextEditorPlugin()
|
||||
: m_settings(0),
|
||||
m_editorFactory(0),
|
||||
m_lineNumberFilter(0),
|
||||
m_searchResultWindow(0)
|
||||
{
|
||||
@@ -154,8 +153,7 @@ bool TextEditorPlugin::initialize(const QStringList &arguments, QString *errorMe
|
||||
m_settings = new TextEditorSettings(this);
|
||||
|
||||
// Add plain text editor factory
|
||||
m_editorFactory = new PlainTextEditorFactory;
|
||||
addAutoReleasedObject(m_editorFactory);
|
||||
addAutoReleasedObject(new PlainTextEditorFactory);
|
||||
|
||||
// Goto line functionality for quick open
|
||||
m_lineNumberFilter = new LineNumberFilter;
|
||||
@@ -261,11 +259,6 @@ void TextEditorPlugin::extensionsInitialized()
|
||||
this, SLOT(updateCurrentSelection(QString)));
|
||||
}
|
||||
|
||||
PlainTextEditorFactory *TextEditorPlugin::editorFactory()
|
||||
{
|
||||
return m_instance->m_editorFactory;
|
||||
}
|
||||
|
||||
LineNumberFilter *TextEditorPlugin::lineNumberFilter()
|
||||
{
|
||||
return m_instance->m_lineNumberFilter;
|
||||
|
||||
Reference in New Issue
Block a user