forked from qt-creator/qt-creator
ProjectExplorer: Properly expand variables in remote working directories
Change-Id: Ie507a72cac23ef3145ea967eb01f7b8f154c9450 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -246,12 +246,14 @@ void WorkingDirectoryAspect::toMap(QVariantMap &data) const
|
|||||||
*/
|
*/
|
||||||
FilePath WorkingDirectoryAspect::workingDirectory(const MacroExpander *expander) const
|
FilePath WorkingDirectoryAspect::workingDirectory(const MacroExpander *expander) const
|
||||||
{
|
{
|
||||||
const Utils::Environment env = m_envAspect ? m_envAspect->environment()
|
const Environment env = m_envAspect ? m_envAspect->environment()
|
||||||
: Utils::Environment::systemEnvironment();
|
: Environment::systemEnvironment();
|
||||||
QString workingDir = m_workingDirectory.toUserOutput();
|
FilePath res = m_workingDirectory;
|
||||||
|
QString workingDir = m_workingDirectory.path();
|
||||||
if (expander)
|
if (expander)
|
||||||
workingDir = expander->expandProcessArgs(workingDir);
|
workingDir = expander->expandProcessArgs(workingDir);
|
||||||
return FilePath::fromString(PathChooser::expandedDirectory(workingDir, env, QString()));
|
res.setPath(PathChooser::expandedDirectory(workingDir, env, QString()));
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath WorkingDirectoryAspect::defaultWorkingDirectory() const
|
FilePath WorkingDirectoryAspect::defaultWorkingDirectory() const
|
||||||
|
Reference in New Issue
Block a user