From 821bc8cdb1be581df6255a1cad2466a3c9fbd1bc Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 17 Jan 2017 15:10:39 +0100 Subject: 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 --- src/shared/proparser/profileevaluator.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/shared/proparser') 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::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::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; } } -- cgit v1.2.3