forked from qt-creator/qt-creator
Utils: Fix pathchooser for remote directories
PathChooserPrivate::expandedPath has a hack that interferes with remote paths when they are already absolute. This patch short-circuits it to keep absolute remote paths intact. Change-Id: I6438842a693653404aa07160de9f68bdbf22519b Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -199,6 +199,9 @@ FilePath PathChooserPrivate::expandedPath(const FilePath &input) const
|
|||||||
if (path.isEmpty())
|
if (path.isEmpty())
|
||||||
return path;
|
return path;
|
||||||
|
|
||||||
|
if (path.isAbsolutePath())
|
||||||
|
return path;
|
||||||
|
|
||||||
switch (m_acceptingKind) {
|
switch (m_acceptingKind) {
|
||||||
case PathChooser::Command:
|
case PathChooser::Command:
|
||||||
case PathChooser::ExistingCommand: {
|
case PathChooser::ExistingCommand: {
|
||||||
@@ -391,7 +394,7 @@ void PathChooser::slotBrowse()
|
|||||||
case PathChooser::ExistingDirectory:
|
case PathChooser::ExistingDirectory:
|
||||||
newPath = FileUtils::getExistingDirectory(this,
|
newPath = FileUtils::getExistingDirectory(this,
|
||||||
makeDialogTitle(tr("Choose Directory")),
|
makeDialogTitle(tr("Choose Directory")),
|
||||||
predefined);
|
predefined, {}, d->m_allowPathFromDevice);
|
||||||
break;
|
break;
|
||||||
case PathChooser::ExistingCommand:
|
case PathChooser::ExistingCommand:
|
||||||
case PathChooser::Command:
|
case PathChooser::Command:
|
||||||
|
Reference in New Issue
Block a user