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:
		@@ -147,7 +147,7 @@ void CppToolsPlugin::shutdown()
 | 
			
		||||
 | 
			
		||||
void CppToolsPlugin::switchHeaderSource()
 | 
			
		||||
{
 | 
			
		||||
    Core::EditorManager *editorManager = Core::ICore::instance()->editorManager();
 | 
			
		||||
    Core::EditorManager *editorManager = Core::EditorManager::instance();
 | 
			
		||||
    Core::IEditor *editor = editorManager->currentEditor();
 | 
			
		||||
    QString otherFile = correspondingHeaderOrSource(editor->file()->fileName());
 | 
			
		||||
    if (!otherFile.isEmpty()) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user