forked from qt-creator/qt-creator
McuSupport: Evaluate environment variables in paths
Packages are created as defined in JSON. Some paths contain variables. This creates dependencies between packages. After all packages are created and collected environment variables are evaluated in one pass. McuTarget packages get updated. This is needed because we shouldn't show the user paths with variables in them. Also file picker wouldn't work. There will be cmake variables support in separate commit. Change-Id: Id210ea394f3f5bb5a14d87f3cf6a0a9a99e690bf Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -124,7 +124,7 @@ FilePath McuPackage::basePath() const
|
||||
|
||||
FilePath McuPackage::path() const
|
||||
{
|
||||
return (basePath() / m_relativePathModifier.path()).absoluteFilePath().cleanPath();
|
||||
return (basePath() / m_relativePathModifier.path()).cleanPath();
|
||||
}
|
||||
|
||||
FilePath McuPackage::defaultPath() const
|
||||
@@ -137,6 +137,13 @@ FilePath McuPackage::detectionPath() const
|
||||
return m_detectionPath;
|
||||
}
|
||||
|
||||
void McuPackage::setPath(const FilePath &newPath)
|
||||
{
|
||||
m_path = newPath;
|
||||
m_defaultPath = newPath;
|
||||
updateStatus();
|
||||
}
|
||||
|
||||
void McuPackage::updatePath()
|
||||
{
|
||||
m_path = m_fileChooser->rawFilePath();
|
||||
|
||||
Reference in New Issue
Block a user