forked from qt-creator/qt-creator
QmakeProjectManager: Fix possible assertion
Amends 6c40fec9b0
.
Change-Id: I11426f17a7e7a81bf4adcba742c6298f224b7ef1
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1791,7 +1791,7 @@ QStringList QmakeProFile::includePaths(QtSupport::ProFileReader *reader, const F
|
|||||||
false)) {
|
false)) {
|
||||||
const QString sysrootifiedPath = sysrootify(el.fileName, sysroot.toString(), projectDir,
|
const QString sysrootifiedPath = sysrootify(el.fileName, sysroot.toString(), projectDir,
|
||||||
buildDir.toString());
|
buildDir.toString());
|
||||||
if (IoUtils::exists(sysrootifiedPath))
|
if (IoUtils::isAbsolutePath(sysrootifiedPath) && IoUtils::exists(sysrootifiedPath))
|
||||||
paths << sysrootifiedPath;
|
paths << sysrootifiedPath;
|
||||||
else
|
else
|
||||||
tryUnfixified = true;
|
tryUnfixified = true;
|
||||||
@@ -1804,7 +1804,7 @@ QStringList QmakeProFile::includePaths(QtSupport::ProFileReader *reader, const F
|
|||||||
for (const QString &p : rawValues) {
|
for (const QString &p : rawValues) {
|
||||||
const QString sysrootifiedPath = sysrootify(QDir::cleanPath(p), sysroot.toString(),
|
const QString sysrootifiedPath = sysrootify(QDir::cleanPath(p), sysroot.toString(),
|
||||||
projectDir, buildDir.toString());
|
projectDir, buildDir.toString());
|
||||||
if (IoUtils::exists(sysrootifiedPath))
|
if (IoUtils::isAbsolutePath(sysrootifiedPath) && IoUtils::exists(sysrootifiedPath))
|
||||||
paths << sysrootifiedPath;
|
paths << sysrootifiedPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user