CMake: Fix editing of CMAKE_PREFIX_PATH

When editing e.g. CMAKE_PREFIX_PATH in the initial configuration
settings it was resolving the path(s) in there, thinking that it was
relative to the project directory.

Fix that after editing the resolved file path was set as the new value,
instead of the raw unexpanded data.

Fixes: QTCREATORBUG-28779
Change-Id: I14d097e3a3a51b78006dd30a67b08477cfe0f2d8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Eike Ziller
2023-02-08 12:27:06 +01:00
parent 5728f09fac
commit 075f39e543

View File

@@ -95,7 +95,7 @@ void ConfigModelItemDelegate::setModelData(QWidget *editor, QAbstractItemModel *
if (data.type == ConfigModel::DataItem::FILE || data.type == ConfigModel::DataItem::DIRECTORY) { if (data.type == ConfigModel::DataItem::FILE || data.type == ConfigModel::DataItem::DIRECTORY) {
auto edit = static_cast<PathChooser *>(editor); auto edit = static_cast<PathChooser *>(editor);
if (edit->rawFilePath().toString() != data.value) if (edit->rawFilePath().toString() != data.value)
model->setData(index, edit->filePath().toString(), Qt::EditRole); model->setData(index, edit->rawFilePath().toString(), Qt::EditRole);
return; return;
} else if (!data.values.isEmpty()) { } else if (!data.values.isEmpty()) {
auto edit = static_cast<QComboBox *>(editor); auto edit = static_cast<QComboBox *>(editor);