Preserve the user-set build directory for Generic Projects

Previously it would be converted to an absolute path. Preserving the
original path allows it to be set as relative to the project.

Reviewed-by: dt
This commit is contained in:
Thorbjørn Lindeijer
2010-03-15 16:15:36 +01:00
parent 7215c03369
commit c0b42868b0
4 changed files with 18 additions and 10 deletions

View File

@@ -89,13 +89,19 @@ ProjectExplorer::Environment GenericBuildConfiguration::environment() const
QString GenericBuildConfiguration::buildDirectory() const
{
QString buildDirectory = m_buildDirectory;
if (buildDirectory.isEmpty()) {
QFileInfo fileInfo(target()->project()->file()->fileName());
// Convert to absolute path when necessary
const QFileInfo projectFile(target()->project()->file()->fileName());
const QDir projectDir(projectFile.path());
return projectDir.absoluteFilePath(m_buildDirectory);
}
buildDirectory = fileInfo.absolutePath();
}
return buildDirectory;
/**
* Returns the build directory unmodified, instead of making it absolute like
* buildDirectory() does.
*/
QString GenericBuildConfiguration::rawBuildDirectory() const
{
return m_buildDirectory;
}
void GenericBuildConfiguration::setBuildDirectory(const QString &buildDirectory)