From bf103789925c345cfbc72118092c8f7d30547d2b Mon Sep 17 00:00:00 2001 From: Claus Steuer Date: Sun, 16 Jul 2017 09:00:55 +0200 Subject: [PATCH] CMake: Fix cmake config can't be changed by user in tealeaf mode Changes to the cmake configuration (via projects page) are not applied in tealeaf mode. The tealeafreader::parse method passes changed config parameters to cmake only if the .cpb file does not exist. Since that file always exists after project initialization the user can't change the cmake config anymore. Make tealeaf reader pass changed config parameters to cmake when a reparse is forced. This restores the behavior from 4.2.2 Change-Id: I31ffad32d176e6290064b55758e4df96d2ffe6bc Reviewed-by: Tobias Hunger --- src/plugins/cmakeprojectmanager/tealeafreader.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/tealeafreader.cpp b/src/plugins/cmakeprojectmanager/tealeafreader.cpp index f9582716665..025cb934e25 100644 --- a/src/plugins/cmakeprojectmanager/tealeafreader.cpp +++ b/src/plugins/cmakeprojectmanager/tealeafreader.cpp @@ -192,14 +192,13 @@ void TeaLeafReader::parse(bool force) { const QString cbpFile = findCbpFile(QDir(m_parameters.buildDirectory.toString())); const QFileInfo cbpFileFi = cbpFile.isEmpty() ? QFileInfo() : QFileInfo(cbpFile); - if (!cbpFileFi.exists()) { + if (!cbpFileFi.exists() || force) { // Initial create: startCMake(toArguments(m_parameters.configuration, m_parameters.expander)); return; } - const bool mustUpdate = force - || m_cmakeFiles.isEmpty() + const bool mustUpdate = m_cmakeFiles.isEmpty() || anyOf(m_cmakeFiles, [&cbpFileFi](const FileName &f) { return f.toFileInfo().lastModified() > cbpFileFi.lastModified(); });