forked from qt-creator/qt-creator
TextEditor: Move CompletionAssistProvider construction
... to the editor factories and pass it to the document, not the widget. Saves some code, puts fewer objects into the object pool. Change-Id: Iaaf250af74dc4e0c62700873accbb40ba88b7d9e Reviewed-by: Christian Stenger <christian.stenger@digia.com> Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
@@ -115,7 +115,6 @@ QmlJSEditorWidget::QmlJSEditorWidget()
|
||||
setMarksVisible(true);
|
||||
setCodeFoldingSupported(true);
|
||||
setLanguageSettingsId(QmlJSTools::Constants::QML_JS_SETTINGS_ID);
|
||||
setCompletionAssistProvider(ExtensionSystem::PluginManager::getObject<Internal::QmlJSCompletionAssistProvider>());
|
||||
}
|
||||
|
||||
void QmlJSEditorWidget::finalizeInitialization()
|
||||
@@ -903,6 +902,7 @@ QmlJSEditorFactory::QmlJSEditorFactory()
|
||||
setCommentStyle(Utils::CommentDefinition::CppStyle);
|
||||
|
||||
addHoverHandler(new QmlJSHoverHandler);
|
||||
setCompletionAssistProvider(new QmlJSCompletionAssistProvider);
|
||||
|
||||
setEditorActionHandlers(TextEditorActionHandler::Format
|
||||
| TextEditorActionHandler::UnCommentSelection
|
||||
|
||||
Reference in New Issue
Block a user