forked from qt-creator/qt-creator
TextEditor: Make completion assist provider a data member
In case of the CppEditor a direct member is not possible due to setup restrictions inside the CppEditor machinery. I'd expect that to be fixable when the editor base system is in good shape. Change-Id: I184e219ca2dff6f67c9b58c182212eb12972cc84 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -63,6 +63,7 @@ CMakeEditor::CMakeEditor(CMakeEditorWidget *editor)
|
||||
TextEditor::Constants::C_TEXTEDITOR));
|
||||
setDuplicateSupported(true);
|
||||
setCommentStyle(Utils::CommentDefinition::HashStyle);
|
||||
setCompletionAssistProvider(ExtensionSystem::PluginManager::getObject<CMakeFileCompletionAssistProvider>());
|
||||
connect(document(), SIGNAL(changed()), this, SLOT(markAsChanged()));
|
||||
}
|
||||
|
||||
@@ -74,11 +75,6 @@ Core::IEditor *CMakeEditor::duplicate()
|
||||
return ret->editor();
|
||||
}
|
||||
|
||||
TextEditor::CompletionAssistProvider *CMakeEditor::completionAssistProvider()
|
||||
{
|
||||
return ExtensionSystem::PluginManager::getObject<CMakeFileCompletionAssistProvider>();
|
||||
}
|
||||
|
||||
void CMakeEditor::markAsChanged()
|
||||
{
|
||||
if (!document()->isModified())
|
||||
|
||||
Reference in New Issue
Block a user