From 075f39e54303d279f44ca887b51b607d13145849 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 8 Feb 2023 12:27:06 +0100 Subject: [PATCH] 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 --- src/plugins/cmakeprojectmanager/configmodelitemdelegate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/cmakeprojectmanager/configmodelitemdelegate.cpp b/src/plugins/cmakeprojectmanager/configmodelitemdelegate.cpp index 812b4ff999d..2a23430aabe 100644 --- a/src/plugins/cmakeprojectmanager/configmodelitemdelegate.cpp +++ b/src/plugins/cmakeprojectmanager/configmodelitemdelegate.cpp @@ -95,7 +95,7 @@ void ConfigModelItemDelegate::setModelData(QWidget *editor, QAbstractItemModel * if (data.type == ConfigModel::DataItem::FILE || data.type == ConfigModel::DataItem::DIRECTORY) { auto edit = static_cast(editor); if (edit->rawFilePath().toString() != data.value) - model->setData(index, edit->filePath().toString(), Qt::EditRole); + model->setData(index, edit->rawFilePath().toString(), Qt::EditRole); return; } else if (!data.values.isEmpty()) { auto edit = static_cast(editor);