aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/proparser
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-01-17 15:10:39 +0100
committerTim Jenssen <tim.jenssen@qt.io>2017-01-18 11:44:34 +0000
commit821bc8cdb1be581df6255a1cad2466a3c9fbd1bc (patch)
tree0e15f4de98a7954508c01dd732562cf2b9a1e283 /src/shared/proparser
parent1a6e6ed553d09c9d8647191216622c2b9c55a43a (diff)
QMake: fix filename normalization
apart from various project tree related issues, we've also seen crashes. Task-number: QTCREATORBUG-17364 Change-Id: I61bb8aff301a048646ed97f8fa2c825cbff8d2cb Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/shared/proparser')
-rw-r--r--src/shared/proparser/profileevaluator.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp
index f60c6afa2c..99f4fe0262 100644
--- a/src/shared/proparser/profileevaluator.cpp
+++ b/src/shared/proparser/profileevaluator.cpp
@@ -83,7 +83,7 @@ QVector<ProFileEvaluator::SourceFile> ProFileEvaluator::fixifiedValues(
foreach (const ProString &str, d->values(ProKey(variable))) {
const QString &el = d->m_option->expandEnvVars(str.toQString());
if (IoUtils::isAbsolutePath(el)) {
- result << SourceFile{ el, str.sourceFile() };
+ result << SourceFile{ QDir::cleanPath(el), str.sourceFile() };
} else {
QString fn = QDir::cleanPath(baseDirectory + QLatin1Char('/') + el);
if (IoUtils::exists(fn))
@@ -132,16 +132,17 @@ QVector<ProFileEvaluator::SourceFile> ProFileEvaluator::absoluteFileValues(
const QString &el = d->m_option->expandEnvVars(str.toQString());
QString absEl;
if (IoUtils::isAbsolutePath(el)) {
- if (m_vfs->exists(el, flags)) {
- result << SourceFile{ el, str.sourceFile() };
+ QString fn = QDir::cleanPath(el);
+ if (m_vfs->exists(fn, flags)) {
+ result << SourceFile{ fn, str.sourceFile() };
goto next;
}
- absEl = el;
+ absEl = fn;
} else {
foreach (const QString &dir, searchDirs) {
QString fn = QDir::cleanPath(dir + QLatin1Char('/') + el);
if (m_vfs->exists(fn, flags)) {
- result << SourceFile{ QDir::cleanPath(fn), str.sourceFile() };
+ result << SourceFile{ fn, str.sourceFile() };
goto next;
}
}