QMakeProject: Fix inconsistent isAbsolutePath

The QMakeEvaluator uses it's own more accurate version of
isAbsolutePath. If we pass in a path that qt thinks is
absolute, e.g. "C:dev", but the qmake evaluator disagrees,
creator crashes. Import these functions from the qmake
evaluator into Utils::FileUtils and use them to prepare
the builddirectory.

Task-number: QTCREATORBUG-12034
Change-Id: Ida28688558f3186db25e3ab73bd39cabc91c1ff0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
Daniel Teske
2014-04-11 17:45:11 +02:00
parent a0b60bef07
commit 920127933b
3 changed files with 32 additions and 2 deletions

View File

@@ -1441,9 +1441,9 @@ QString QmakeProject::shadowBuildDirectory(const QString &proFilePath, const Kit
const QString projectName = QFileInfo(proFilePath).completeBaseName();
ProjectExplorer::ProjectMacroExpander expander(proFilePath, projectName, k, suffix);
QDir projectDir = QDir(projectDirectory(proFilePath));
QString projectDir = projectDirectory(proFilePath);
QString buildPath = Utils::expandMacros(Core::DocumentManager::buildDirectory(), &expander);
return QDir::cleanPath(projectDir.absoluteFilePath(buildPath));
return Utils::FileUtils::resolvePath(projectDir, buildPath);
}
QString QmakeProject::buildNameFor(const Kit *k)