Allow giving TextEditorFactory custom CommentDefinition

It was not possible to set custom comment styles.
Also simplifies the code for the predefined styles.

Change-Id: Id7f345d65b747bfac5a15e3eb15cd2beb106b281
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2017-04-24 16:01:14 +02:00
parent 57b3f7debb
commit 73f2c0f4e8
12 changed files with 27 additions and 35 deletions

View File

@@ -323,7 +323,7 @@ GlslEditorFactory::GlslEditorFactory()
setEditorWidgetCreator([]() { return new GlslEditorWidget; });
setIndenterCreator([]() { return new GlslIndenter; });
setSyntaxHighlighterCreator([]() { return new GlslHighlighter; });
setCommentStyle(Utils::CommentDefinition::CppStyle);
setCommentDefinition(Utils::CommentDefinition::CppStyle);
setCompletionAssistProvider(new GlslCompletionAssistProvider);
setParenthesesMatchingEnabled(true);
setMarksVisible(true);