McuSupport: FilePath::fromString -> fromUserInput changes

Prevent non-portable dir delimiters from getting into a FilePath.

Change-Id: I78e4a98e03ffe95e3cef70c9c499af28fa33c25c
Reviewed-by: <christiaan.janssen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2021-09-27 22:12:34 +02:00
parent ef545260cd
commit f88c885d44
2 changed files with 5 additions and 5 deletions

View File

@@ -1305,7 +1305,8 @@ Tasks McuDependenciesKitAspect::validate(const Kit *k) const
if (!environment.hasKey(dependency.name)) {
result << BuildSystemTask(Task::Warning, tr("Environment variable %1 not defined.").arg(dependency.name));
} else {
const auto path = Utils::FilePath::fromString(environment.value(dependency.name) + "/" + dependency.value);
const auto path = Utils::FilePath::fromUserInput(
environment.value(dependency.name) + "/" + dependency.value);
if (!path.exists()) {
result << BuildSystemTask(Task::Warning, tr("%1 not found.").arg(path.toUserOutput()));
}