forked from qt-creator/qt-creator
Merge ITextMark and BaseTextMark
Turns out we don't even need two-phase initialization, by transparently postponing registration until we get a non-empty file name, either at constuction, or at file name change times. Change-Id: I3e87e47c820066e6707e946fc474ab9c1993e61f Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
#include "plaintexteditor.h"
|
||||
#include "outlinefactory.h"
|
||||
#include "snippets/plaintextsnippetprovider.h"
|
||||
#include "basetextmarkregistry.h"
|
||||
#include "textmarkregistry.h"
|
||||
#include <texteditor/generichighlighter/manager.h>
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
@@ -190,7 +190,7 @@ bool TextEditorPlugin::initialize(const QStringList &arguments, QString *errorMe
|
||||
m_outlineFactory = new OutlineFactory;
|
||||
addAutoReleasedObject(m_outlineFactory);
|
||||
|
||||
m_baseTextMarkRegistry = new BaseTextMarkRegistry(this);
|
||||
m_baseTextMarkRegistry = new TextMarkRegistry(this);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -271,7 +271,7 @@ LineNumberFilter *TextEditorPlugin::lineNumberFilter()
|
||||
return m_instance->m_lineNumberFilter;
|
||||
}
|
||||
|
||||
BaseTextMarkRegistry *TextEditorPlugin::baseTextMarkRegistry()
|
||||
TextMarkRegistry *TextEditorPlugin::baseTextMarkRegistry()
|
||||
{
|
||||
return m_instance->m_baseTextMarkRegistry;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user