forked from qt-creator/qt-creator
Utils: Fix pathchooser auto-search-in-path for remote cases
Amends 11a40e02f2.
Environment::searchInPath only works for local setups, the
remote replacement is FilePath::searchOnDevice.
Change-Id: I8a2ba51903d3308ca9198fbf1154779c78e69e63
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -220,7 +220,9 @@ FilePath PathChooserPrivate::expandedPath(const QString &input) const
|
|||||||
switch (m_acceptingKind) {
|
switch (m_acceptingKind) {
|
||||||
case PathChooser::Command:
|
case PathChooser::Command:
|
||||||
case PathChooser::ExistingCommand: {
|
case PathChooser::ExistingCommand: {
|
||||||
const FilePath expanded = m_environment.searchInPath(path.path(), {m_baseDirectory});
|
FilePaths searchPaths = m_environment.path();
|
||||||
|
searchPaths.append(m_baseDirectory);
|
||||||
|
const FilePath expanded = path.searchOnDevice(searchPaths);
|
||||||
return expanded.isEmpty() ? path : expanded;
|
return expanded.isEmpty() ? path : expanded;
|
||||||
}
|
}
|
||||||
case PathChooser::Any:
|
case PathChooser::Any:
|
||||||
|
|||||||
Reference in New Issue
Block a user