forked from qt-creator/qt-creator
CMakePM: Adapt to change in FilePath
Silences some soft asserts. Change-Id: I4e39b66983552d85650062a3e8748e91936e8174 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -1241,8 +1241,8 @@ void CMakeBuildSystem::updateInitialCMakeExpandableVars()
|
|||||||
|
|
||||||
if (it != cm.cend()) {
|
if (it != cm.cend()) {
|
||||||
const QByteArray initialValue = initialConfig.expandedValueOf(kit(), var).toUtf8();
|
const QByteArray initialValue = initialConfig.expandedValueOf(kit(), var).toUtf8();
|
||||||
const FilePath initialPath = FilePath::fromString(QString::fromUtf8(initialValue));
|
const FilePath initialPath = FilePath::fromUserInput(QString::fromUtf8(initialValue));
|
||||||
const FilePath path = FilePath::fromString(QString::fromUtf8(it->value));
|
const FilePath path = FilePath::fromUserInput(QString::fromUtf8(it->value));
|
||||||
|
|
||||||
if (!initialValue.isEmpty() && !samePath(path, initialPath) && !path.exists()) {
|
if (!initialValue.isEmpty() && !samePath(path, initialPath) && !path.exists()) {
|
||||||
CMakeConfigItem item(*it);
|
CMakeConfigItem item(*it);
|
||||||
@@ -1267,11 +1267,11 @@ void CMakeBuildSystem::updateInitialCMakeExpandableVars()
|
|||||||
const QByteArrayList initialValueList = initialConfig.expandedValueOf(kit(), var).toUtf8().split(';');
|
const QByteArrayList initialValueList = initialConfig.expandedValueOf(kit(), var).toUtf8().split(';');
|
||||||
|
|
||||||
for (const auto &initialValue: initialValueList) {
|
for (const auto &initialValue: initialValueList) {
|
||||||
const FilePath initialPath = FilePath::fromString(QString::fromUtf8(initialValue));
|
const FilePath initialPath = FilePath::fromUserInput(QString::fromUtf8(initialValue));
|
||||||
|
|
||||||
const bool pathIsContained
|
const bool pathIsContained
|
||||||
= Utils::contains(it->value.split(';'), [samePath, initialPath](const QByteArray &p) {
|
= Utils::contains(it->value.split(';'), [samePath, initialPath](const QByteArray &p) {
|
||||||
return samePath(FilePath::fromString(QString::fromUtf8(p)), initialPath);
|
return samePath(FilePath::fromUserInput(QString::fromUtf8(p)), initialPath);
|
||||||
});
|
});
|
||||||
if (!initialValue.isEmpty() && !pathIsContained) {
|
if (!initialValue.isEmpty() && !pathIsContained) {
|
||||||
CMakeConfigItem item(*it);
|
CMakeConfigItem item(*it);
|
||||||
|
Reference in New Issue
Block a user