diff --git a/src/plugins/projectexplorer/processparameters.cpp b/src/plugins/projectexplorer/processparameters.cpp index fdec5291db8..a91f01264f6 100644 --- a/src/plugins/projectexplorer/processparameters.cpp +++ b/src/plugins/projectexplorer/processparameters.cpp @@ -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; }