forked from qt-creator/qt-creator
Coco: Use FilePath::searchInPath instead of Environment::searchInPath
Not obviously better in this case, but I'd like to centralize searching on the FilePath side. Change-Id: I27cec97c0590cf27c3659b3aa262b86439670679 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -40,12 +40,13 @@ void CocoPluginPrivate::startCoco()
|
||||
auto layout = new QFormLayout();
|
||||
|
||||
const Environment env = Environment::systemEnvironment();
|
||||
FilePath squishCocoPath = FilePath::fromString(env.value("SQUISHCOCO"));
|
||||
const FilePaths candidates = env.findAllInPath("coveragebrowser", {squishCocoPath});
|
||||
const FilePath squishCocoPath = FilePath::fromUserInput(env.value("SQUISHCOCO"));
|
||||
const FilePath candidate = FilePath("coveragebrowser").searchInPath({squishCocoPath},
|
||||
FilePath::PrependToPath);
|
||||
|
||||
PathChooser cocoChooser;
|
||||
if (!candidates.isEmpty())
|
||||
cocoChooser.setFilePath(candidates.first());
|
||||
if (!candidate.isEmpty())
|
||||
cocoChooser.setFilePath(candidate);
|
||||
cocoChooser.setExpectedKind(PathChooser::Command);
|
||||
cocoChooser.setPromptDialogTitle(Tr::tr("Select a Squish Coco CoverageBrowser Executable"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user