forked from qt-creator/qt-creator
		
	CppTools: Add CppToolsBridge
We broke the dependency of BaseEditorDocumentProcessor *BaseEditorDocumentProcessor::get(const QString &filePath) It's hiding static calls and it is much easier to do it that way than to provide a reference to every user. It's also possible to exchange it with different implementations for different test cases. Change-Id: Ic74699b45948e8b48f7efb6a1b295ba2641b8951 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
		@@ -45,6 +45,8 @@
 | 
			
		||||
#include "cppprojectfile.h"
 | 
			
		||||
#include "cpplocatordata.h"
 | 
			
		||||
#include "cppincludesfilter.h"
 | 
			
		||||
#include "cpptoolsbridge.h"
 | 
			
		||||
#include "cpptoolsbridgeqtcreatorimplementation.h"
 | 
			
		||||
 | 
			
		||||
#include <coreplugin/actionmanager/actioncontainer.h>
 | 
			
		||||
#include <coreplugin/actionmanager/actionmanager.h>
 | 
			
		||||
@@ -88,6 +90,8 @@ CppToolsPlugin::CppToolsPlugin()
 | 
			
		||||
    , m_codeModelSettings(new CppCodeModelSettings)
 | 
			
		||||
{
 | 
			
		||||
    m_instance = this;
 | 
			
		||||
    auto bridgeImplementation = std::unique_ptr<CppToolsBridgeQtCreatorImplementation>(new CppToolsBridgeQtCreatorImplementation);
 | 
			
		||||
    CppToolsBridge::setCppToolsBridgeImplementation(std::move(bridgeImplementation));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
CppToolsPlugin::~CppToolsPlugin()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user