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:
@@ -291,7 +291,7 @@ void ProjectTreeWidget::openItem(const QModelIndex &mainIndex)
|
||||
{
|
||||
Node *node = m_model->nodeForIndex(mainIndex);
|
||||
if (node->nodeType() == FileNodeType) {
|
||||
Core::EditorManager *editorManager = Core::ICore::instance()->editorManager();
|
||||
Core::EditorManager *editorManager = Core::EditorManager::instance();
|
||||
editorManager->openEditor(node->path());
|
||||
editorManager->ensureEditorManagerVisible();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user