forked from qt-creator/qt-creator
CMake: Remove magic configuration from CMake
Get rid of magic configuration handling in the CMakeProjectManager. * Use CMakeCache.txt as the sole source of truth, do not keep a shadow copy of configuration in the .user file * Have initial CMake arguments that are easy to edit in batch (Fixes: QTCREATORBUG-18179) used whenever no CMakeCache.txt file is in the build directory. These allow for any thing that can be passed to CMake on the command line. (Fixes: QTCREATORBUG-16296) * Ask when changes to CMake configuration were not applied (Fixes: QTCREATORBUG-18504) * Run cmake with arguments effecting its configuration only when the CMake settings are changed in the UI, run CMake without any special arguments in all other cases. * Get rid of the confusing dialog used to keep settings in sync between what is in CMakeCache.txt and Creator (Fixes: QTCREATORBUG-23218) Change-Id: I26d55be7df733f084f5691ecf7d7b4352f58b8e7 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -96,24 +96,6 @@ void ConfigModel::setConfigurationFromKit(const QHash<QString, QString> &kitConf
|
||||
setConfiguration(m_configuration);
|
||||
}
|
||||
|
||||
void ConfigModel::setConfigurationForCMake(const QHash<QString, QString> &config)
|
||||
{
|
||||
for (InternalDataItem &i : m_configuration) {
|
||||
if (!config.contains(i.key))
|
||||
continue;
|
||||
|
||||
const QString v = config.value(i.key);
|
||||
if (i.value == v) {
|
||||
i.newValue.clear();
|
||||
i.isUserChanged = false;
|
||||
} else {
|
||||
i.newValue = v;
|
||||
i.isUserChanged = true;
|
||||
}
|
||||
}
|
||||
setConfiguration(m_configuration);
|
||||
}
|
||||
|
||||
void ConfigModel::flush()
|
||||
{
|
||||
setConfiguration(QList<InternalDataItem>());
|
||||
|
||||
Reference in New Issue
Block a user