CMake: Be more graceful for device related bits

Also when reading settings. Check was there for writing already,
and possibly should not exist at all, other kit settings are not
purging at that stage.

Change-Id: Ia052efd5a791f4a86be3d26a61ebeb94d506b012
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
hjk
2022-03-10 13:16:37 +01:00
parent 95510a842e
commit e5e740344d

View File

@@ -239,9 +239,10 @@ CMakeToolSettingsAccessor::cmakeTools(const QVariantMap &data, bool fromSdk) con
const QVariantMap dbMap = data.value(key).toMap(); const QVariantMap dbMap = data.value(key).toMap();
auto item = std::make_unique<CMakeTool>(dbMap, fromSdk); auto item = std::make_unique<CMakeTool>(dbMap, fromSdk);
if (item->isAutoDetected() && !item->cmakeExecutable().isExecutableFile()) { const FilePath cmakeExecutable = item->cmakeExecutable();
qWarning() << QString::fromLatin1("CMakeTool \"%1\" (%2) dropped since the command is not executable.") if (item->isAutoDetected() && !cmakeExecutable.needsDevice() && !cmakeExecutable.isExecutableFile()) {
.arg(item->cmakeExecutable().toUserOutput(), item->id().toString()); qWarning() << QString("CMakeTool \"%1\" (%2) dropped since the command is not executable.")
.arg(cmakeExecutable.toUserOutput(), item->id().toString());
continue; continue;
} }