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:
@@ -170,7 +170,7 @@ void FolderNavigationWidget::openItem(const QModelIndex &index)
|
||||
setCurrentTitle(QDir(m_dirModel->filePath(srcIndex)));
|
||||
} else {
|
||||
const QString filePath = m_dirModel->filePath(srcIndex);
|
||||
Core::EditorManager *editorManager = Core::ICore::instance()->editorManager();
|
||||
Core::EditorManager *editorManager = Core::EditorManager::instance();
|
||||
editorManager->openEditor(filePath);
|
||||
editorManager->ensureEditorManagerVisible();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user