ProjectExplorer: Trim value of build directory

... coming from the line edit. Nobody enters a build directory with
leading or trailing spaces on purpose.

Fixes: QTCREATORBUG-16805
Change-Id: Ic33f126fb9c4c0d008ebeaf00a78c737729be623
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2019-05-27 14:34:54 +02:00
parent 0268d7c792
commit be9bd1505b

View File

@@ -104,7 +104,7 @@ BuildConfiguration::BuildConfiguration(Target *target, Core::Id id)
Utils::FileName BuildConfiguration::buildDirectory() const
{
QString path = environment().expandVariables(m_buildDirectoryAspect->value());
QString path = environment().expandVariables(m_buildDirectoryAspect->value().trimmed());
path = QDir::cleanPath(macroExpander()->expand(path));
return Utils::FileName::fromString(QDir::cleanPath(QDir(target()->project()->projectDirectory().toString()).absoluteFilePath(path)));
}