forked from qt-creator/qt-creator
Utils: Introduce a FilePath::withNewPath() convenience method
It's effectively the mirrored version of onDevice() with an equally odd name which is a bit more straightforward to use in some cases. Change-Id: I0cfedeb58871a857c93144e2a0d734bad1bcd887 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -185,7 +185,7 @@ void CMakeToolManager::autoDetectCMakeForDevice(const FilePath &deviceRoot,
|
||||
QString *logMessage)
|
||||
{
|
||||
QStringList messages{tr("Searching CMake binaries...")};
|
||||
const FilePaths candidates = {FilePath::fromString("cmake").onDevice(deviceRoot)};
|
||||
const FilePaths candidates = {deviceRoot.withNewPath("cmake")};
|
||||
const Environment env = deviceRoot.deviceEnvironment();
|
||||
for (const FilePath &candidate : candidates) {
|
||||
const FilePath cmake = candidate.searchOnDevice(env.path());
|
||||
|
||||
Reference in New Issue
Block a user