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:
		@@ -34,7 +34,6 @@
 | 
			
		||||
#include "basevcssubmiteditorfactory.h"
 | 
			
		||||
#include "vcsbasesubmiteditor.h"
 | 
			
		||||
 | 
			
		||||
#include <coreplugin/icore.h>
 | 
			
		||||
#include <coreplugin/editormanager/editormanager.h>
 | 
			
		||||
 | 
			
		||||
namespace VCSBase {
 | 
			
		||||
@@ -82,8 +81,7 @@ QStringList BaseVCSSubmitEditorFactory::mimeTypes() const
 | 
			
		||||
 | 
			
		||||
Core::IFile *BaseVCSSubmitEditorFactory::open(const QString &fileName)
 | 
			
		||||
{
 | 
			
		||||
    Core::ICore *core = Core::ICore::instance();
 | 
			
		||||
    if (Core::IEditor *iface = core->editorManager()->openEditor(fileName, kind()))
 | 
			
		||||
    if (Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, kind()))
 | 
			
		||||
        return iface->file();
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user