QmakePM: Treat QMAKE_CC/CXX as user input when converting to FilePath

qmake may construct QMAKE_CC and QMAKE_CXX by using paths from
environment variables that have native delimiters. That is the case with
Android (see mkspecs/android-clang/qmake.conf).

That leads to QMAKE_CC and QMAKE_CXX having mixed-style path separators,
and that is the reason to treat them as user input.

Change-Id: I1baf180c16710f4cd00ac182fa241b84ae99fa38
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Alessandro Portale
2021-10-31 20:16:58 +01:00
parent 57381ab358
commit f6c26233c8

View File

@@ -1374,10 +1374,10 @@ static Utils::FilePath getFullPathOf(const QmakeProFile *pro, Variable variable,
if (values.isEmpty())
return Utils::FilePath();
const QString exe = values.last();
QTC_ASSERT(bc, return Utils::FilePath::fromString(exe));
QTC_ASSERT(bc, return Utils::FilePath::fromUserInput(exe));
QFileInfo fi(exe);
if (fi.isAbsolute())
return Utils::FilePath::fromString(exe);
return Utils::FilePath::fromUserInput(exe);
return bc->environment().searchInPath(exe);
}