forked from qt-creator/qt-creator
ProjectExplorer: Use a functor for BuildSystem creation
... instead of creating the BuildSystem direct. This will help the shift of BuildSystem owner ship as a Project will have potentially multiple BuildSystem instances (one per BuildConfiguration), but still be responsible for creating them with the Targets. Change-Id: I2dd71c7687ed41af9e42c874b3f932ce704e7ee3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -57,8 +57,8 @@ Q_LOGGING_CATEGORY(cmakeBuildSystemLog, "qtc.cmake.buildsystem", QtWarningMsg);
|
||||
// CMakeBuildSystem:
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
CMakeBuildSystem::CMakeBuildSystem(CMakeProject *p)
|
||||
: BuildSystem(p)
|
||||
CMakeBuildSystem::CMakeBuildSystem(Project *project)
|
||||
: BuildSystem(project)
|
||||
, m_cppCodeModelUpdater(new CppTools::CppProjectUpdater)
|
||||
{
|
||||
// TreeScanner:
|
||||
@@ -67,9 +67,9 @@ CMakeBuildSystem::CMakeBuildSystem(CMakeProject *p)
|
||||
this,
|
||||
&CMakeBuildSystem::handleTreeScanningFinished);
|
||||
|
||||
m_treeScanner.setFilter([this, p](const Utils::MimeType &mimeType, const Utils::FilePath &fn) {
|
||||
m_treeScanner.setFilter([this](const MimeType &mimeType, const FilePath &fn) {
|
||||
// Mime checks requires more resources, so keep it last in check list
|
||||
auto isIgnored = fn.toString().startsWith(p->projectFilePath().toString() + ".user")
|
||||
auto isIgnored = fn.toString().startsWith(projectFilePath().toString() + ".user")
|
||||
|| TreeScanner::isWellKnownBinary(mimeType, fn);
|
||||
|
||||
// Cache mime check result for speed up
|
||||
|
||||
Reference in New Issue
Block a user