forked from qt-creator/qt-creator
Avoid going through ICore when it's not necessary
Many singletons have their own instance() method, in which case there is no need to use ICore::instance() to get access to them.
This commit is contained in:
@@ -166,7 +166,7 @@ void TextEditorPlugin::initializeEditor(TextEditor::PlainTextEditor *editor)
|
||||
|
||||
void TextEditorPlugin::invokeCompletion()
|
||||
{
|
||||
Core::IEditor *iface = Core::ICore::instance()->editorManager()->currentEditor();
|
||||
Core::IEditor *iface = Core::EditorManager::instance()->currentEditor();
|
||||
ITextEditor *editor = qobject_cast<ITextEditor *>(iface);
|
||||
if (editor)
|
||||
editor->triggerCompletions();
|
||||
|
Reference in New Issue
Block a user