Make sysrootify case-insensitive on windows

Task-Number: QTCREATORBUG-6419

Change-Id: If3ab035ee3a117744213d5e3db3ffa41f7283d53
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Daniel Teske
2011-11-01 21:43:54 +01:00
committed by Oswald Buddenhagen
parent 0c3f3c009a
commit e7c6b9dbbb

View File

@@ -1578,8 +1578,14 @@ QString ProFileEvaluator::Private::currentDirectory() const
QString ProFileEvaluator::Private::sysrootify(const QString &path, const QString &baseDir) const
{
const bool isHostSystemPath = m_option->sysroot.isEmpty() || path.startsWith(m_option->sysroot)
|| path.startsWith(baseDir) || path.startsWith(m_outputDir);
#ifdef Q_OS_WIN
Qt::CaseSensitivity cs = Qt::CaseInsensitive;
#else
Qt::CaseSensitivity cs = Qt::CaseSensitive;
#endif
const bool isHostSystemPath = m_option->sysroot.isEmpty() || path.startsWith(m_option->sysroot, cs)
|| path.startsWith(baseDir, cs) || path.startsWith(m_outputDir, cs);
return isHostSystemPath ? path : m_option->sysroot + path;
}