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:
		@@ -509,7 +509,7 @@ void FileManager::syncWithEditor(Core::IContext *context)
 | 
			
		||||
    if (!context)
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
    Core::IEditor *editor = Core::ICore::instance()->editorManager()->currentEditor();
 | 
			
		||||
    Core::IEditor *editor = Core::EditorManager::instance()->currentEditor();
 | 
			
		||||
    if (editor && (editor->widget() == context->widget()))
 | 
			
		||||
        setCurrentFile(editor->file()->fileName());
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user