forked from qt-creator/qt-creator
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>
This commit is contained in:
committed by
Tim Jenssen
parent
1a6e6ed553
commit
821bc8cdb1
@@ -83,7 +83,7 @@ QVector<ProFileEvaluator::SourceFile> ProFileEvaluator::fixifiedValues(
|
|||||||
foreach (const ProString &str, d->values(ProKey(variable))) {
|
foreach (const ProString &str, d->values(ProKey(variable))) {
|
||||||
const QString &el = d->m_option->expandEnvVars(str.toQString());
|
const QString &el = d->m_option->expandEnvVars(str.toQString());
|
||||||
if (IoUtils::isAbsolutePath(el)) {
|
if (IoUtils::isAbsolutePath(el)) {
|
||||||
result << SourceFile{ el, str.sourceFile() };
|
result << SourceFile{ QDir::cleanPath(el), str.sourceFile() };
|
||||||
} else {
|
} else {
|
||||||
QString fn = QDir::cleanPath(baseDirectory + QLatin1Char('/') + el);
|
QString fn = QDir::cleanPath(baseDirectory + QLatin1Char('/') + el);
|
||||||
if (IoUtils::exists(fn))
|
if (IoUtils::exists(fn))
|
||||||
@@ -132,16 +132,17 @@ QVector<ProFileEvaluator::SourceFile> ProFileEvaluator::absoluteFileValues(
|
|||||||
const QString &el = d->m_option->expandEnvVars(str.toQString());
|
const QString &el = d->m_option->expandEnvVars(str.toQString());
|
||||||
QString absEl;
|
QString absEl;
|
||||||
if (IoUtils::isAbsolutePath(el)) {
|
if (IoUtils::isAbsolutePath(el)) {
|
||||||
if (m_vfs->exists(el, flags)) {
|
QString fn = QDir::cleanPath(el);
|
||||||
result << SourceFile{ el, str.sourceFile() };
|
if (m_vfs->exists(fn, flags)) {
|
||||||
|
result << SourceFile{ fn, str.sourceFile() };
|
||||||
goto next;
|
goto next;
|
||||||
}
|
}
|
||||||
absEl = el;
|
absEl = fn;
|
||||||
} else {
|
} else {
|
||||||
foreach (const QString &dir, searchDirs) {
|
foreach (const QString &dir, searchDirs) {
|
||||||
QString fn = QDir::cleanPath(dir + QLatin1Char('/') + el);
|
QString fn = QDir::cleanPath(dir + QLatin1Char('/') + el);
|
||||||
if (m_vfs->exists(fn, flags)) {
|
if (m_vfs->exists(fn, flags)) {
|
||||||
result << SourceFile{ QDir::cleanPath(fn), str.sourceFile() };
|
result << SourceFile{ fn, str.sourceFile() };
|
||||||
goto next;
|
goto next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user