Merge remote-tracking branch 'origin/4.13' into master

Change-Id: I1c426d95eedd82bd4470a64a9bafd734d23081ac
This commit is contained in:
Eike Ziller
2020-08-13 11:41:32 +02:00
104 changed files with 1674 additions and 655 deletions

View File

@@ -195,10 +195,7 @@ CMakeBuildSystem::CMakeBuildSystem(CMakeBuildConfiguration *bc)
connect(&m_reader, &FileApiReader::errorOccurred, this, &CMakeBuildSystem::handleParsingFailed);
connect(&m_reader, &FileApiReader::dirty, this, &CMakeBuildSystem::becameDirty);
connect(SessionManager::instance(),
&SessionManager::projectAdded,
this,
&CMakeBuildSystem::wireUpConnections);
wireUpConnections();
}
CMakeBuildSystem::~CMakeBuildSystem()
@@ -712,13 +709,8 @@ void CMakeBuildSystem::handleParsingFailed(const QString &msg)
combineScanAndParse();
}
void CMakeBuildSystem::wireUpConnections(const Project *p)
void CMakeBuildSystem::wireUpConnections()
{
if (p != project())
return; // That's not us...
disconnect(SessionManager::instance(), nullptr, this, nullptr);
// At this point the entire project will be fully configured, so let's connect everything and
// trigger an initial parser run
@@ -740,6 +732,12 @@ void CMakeBuildSystem::wireUpConnections(const Project *p)
setParametersAndRequestParse(BuildDirParameters(cmakeBuildConfiguration()),
CMakeBuildSystem::REPARSE_DEFAULT);
});
connect(project(), &Project::activeTargetChanged, this, [this]() {
// Build configuration has changed:
qCDebug(cmakeBuildSystemLog) << "Requesting parse due to active target changed";
setParametersAndRequestParse(BuildDirParameters(cmakeBuildConfiguration()),
CMakeBuildSystem::REPARSE_DEFAULT);
});
// BuildConfiguration changed:
connect(cmakeBuildConfiguration(), &CMakeBuildConfiguration::environmentChanged, this, [this]() {

View File

@@ -134,7 +134,7 @@ private:
void handleParsingSucceeded();
void handleParsingFailed(const QString &msg);
void wireUpConnections(const ProjectExplorer::Project *p);
void wireUpConnections();
Utils::FilePath workDirectory(const BuildDirParameters &parameters);
void stopParsingAndClearState();