forked from qt-creator/qt-creator
CMake: Cache cmake configuration only once
This fixes saves memory and fixes some update issues with the cmake configuration, where the three layers of caches used to interfere with each other. Task-number: QTCREATORBUG-17360 Change-Id: I5564bbe46ca8de6b38dd710100bfc18fad98eac5 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -146,7 +146,7 @@ void CMakeBuildConfiguration::ctor()
|
||||
connect(m_buildDirManager.get(), &BuildDirManager::errorOccured,
|
||||
this, &CMakeBuildConfiguration::setError);
|
||||
connect(m_buildDirManager.get(), &BuildDirManager::configurationStarted,
|
||||
this, [this]() { m_completeConfigurationCache.clear(); emit parsingStarted(); });
|
||||
this, &CMakeBuildConfiguration::parsingStarted);
|
||||
|
||||
connect(this, &CMakeBuildConfiguration::environmentChanged,
|
||||
m_buildDirManager.get(), &BuildDirManager::forceReparse);
|
||||
@@ -259,10 +259,7 @@ QList<ConfigModel::DataItem> CMakeBuildConfiguration::completeCMakeConfiguration
|
||||
if (!m_buildDirManager || m_buildDirManager->isParsing())
|
||||
return QList<ConfigModel::DataItem>();
|
||||
|
||||
if (m_completeConfigurationCache.isEmpty())
|
||||
m_completeConfigurationCache = m_buildDirManager->parsedConfiguration();
|
||||
|
||||
return Utils::transform(m_completeConfigurationCache,
|
||||
return Utils::transform(m_buildDirManager->parsedConfiguration(),
|
||||
[this](const CMakeConfigItem &i) {
|
||||
ConfigModel::DataItem j;
|
||||
j.key = QString::fromUtf8(i.key);
|
||||
|
||||
Reference in New Issue
Block a user