Merge remote-tracking branch 'origin/3.3'

Conflicts:
	src/plugins/cppeditor/cppdocumentationcommenthelper.cpp

Change-Id: I2cf25eba1de149765a6c44ad354d606ce9de512d
This commit is contained in:
Eike Ziller
2015-01-08 10:38:20 +01:00
72 changed files with 4939 additions and 3784 deletions

View File

@@ -7373,6 +7373,20 @@ void TextEditorFactory::setGenericSyntaxHighlighter(const QString &mimeType)
};
}
void TextEditorFactory::setGenericSyntaxHighlighterByName(const QString &name)
{
d->m_syntaxHighlighterCreator = [this, name]() -> SyntaxHighlighter * {
TextEditor::Highlighter *highlighter = new TextEditor::Highlighter();
QString definitionId = Manager::instance()->definitionIdByName(name);
if (!definitionId.isEmpty()) {
const QSharedPointer<HighlightDefinition> &definition = Manager::instance()->definition(definitionId);
if (!definition.isNull() && definition->isValid())
highlighter->setDefaultContext(definition->initialContext());
}
return highlighter;
};
}
void TextEditorFactory::setAutoCompleterCreator(const AutoCompleterCreator &creator)
{
d->m_autoCompleterCreator = creator;