profileevaluator: do not add sysroot if the result does not exist

Required for Qt paths in includes on ios.

Task-number: QTCREATORBUG-11908
Change-Id: Ic56c81812d13e3d6f6acb31d59c1ff7c7048aeff
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Fawzi Mohamed
2014-04-02 12:35:59 +02:00
parent 41327df2a9
commit 73577b33f3

View File

@@ -100,7 +100,8 @@ QString ProFileEvaluator::sysrootify(const QString &path, const QString &baseDir
#endif #endif
const bool isHostSystemPath = const bool isHostSystemPath =
option->sysroot.isEmpty() || path.startsWith(option->sysroot, cs) option->sysroot.isEmpty() || path.startsWith(option->sysroot, cs)
|| path.startsWith(baseDir, cs) || path.startsWith(d->m_outputDir, cs); || path.startsWith(baseDir, cs) || path.startsWith(d->m_outputDir, cs)
|| !QFileInfo(option->sysroot + path).exists();
return isHostSystemPath ? path : option->sysroot + path; return isHostSystemPath ? path : option->sysroot + path;
} }