ProjectExplorer: Fix ProcessParameters::effectiveWorkingDirectory()

... for remote setups: QDir::cleanPath() must not be used on a
fully stringified FilePath, as this also collapses the double slashs
in the :// separator.

Change-Id: I186328ecfc33665c50eda4efebe5d7a4cc3e4917
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2021-05-31 16:24:51 +02:00
parent ba0c797e6d
commit f4a8c4590e

View File

@@ -100,11 +100,11 @@ void ProcessParameters::setWorkingDirectory(const FilePath &workingDirectory)
FilePath ProcessParameters::effectiveWorkingDirectory() const
{
if (m_effectiveWorkingDirectory.isEmpty()) {
QString wds = m_workingDirectory.toString();
m_effectiveWorkingDirectory = m_workingDirectory;
QString path = m_workingDirectory.path();
if (m_macroExpander)
wds = m_macroExpander->expand(wds);
m_effectiveWorkingDirectory
= FilePath::fromString(QDir::cleanPath(m_environment.expandVariables(wds)));
path = m_macroExpander->expand(path);
m_effectiveWorkingDirectory.setPath(QDir::cleanPath(m_environment.expandVariables(path)));
}
return m_effectiveWorkingDirectory;
}