forked from qt-creator/qt-creator
move sysroot out of QMakeGlobals
it's a hack which is exclusive to ProFileEvaluator. Change-Id: I86141dc8985330a8a1602ced002545a9eb0a646c Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -44,7 +44,7 @@ void ProFileEvaluator::initialize()
|
||||
QMakeEvaluator::initStatics();
|
||||
}
|
||||
|
||||
ProFileEvaluator::ProFileEvaluator(QMakeGlobals *option, QMakeParser *parser,
|
||||
ProFileEvaluator::ProFileEvaluator(ProFileGlobals *option, QMakeParser *parser,
|
||||
QMakeHandler *handler)
|
||||
: d(new QMakeEvaluator(option, parser, handler))
|
||||
{
|
||||
@@ -93,16 +93,17 @@ QStringList ProFileEvaluator::values(const QString &variableName, const ProFile
|
||||
|
||||
QString ProFileEvaluator::sysrootify(const QString &path, const QString &baseDir) const
|
||||
{
|
||||
ProFileGlobals *option = static_cast<ProFileGlobals *>(d->m_option);
|
||||
#ifdef Q_OS_WIN
|
||||
Qt::CaseSensitivity cs = Qt::CaseInsensitive;
|
||||
#else
|
||||
Qt::CaseSensitivity cs = Qt::CaseSensitive;
|
||||
#endif
|
||||
const bool isHostSystemPath =
|
||||
d->m_option->sysroot.isEmpty() || path.startsWith(d->m_option->sysroot, cs)
|
||||
option->sysroot.isEmpty() || path.startsWith(option->sysroot, cs)
|
||||
|| path.startsWith(baseDir, cs) || path.startsWith(d->m_outputDir, cs);
|
||||
|
||||
return isHostSystemPath ? path : d->m_option->sysroot + path;
|
||||
return isHostSystemPath ? path : option->sysroot + path;
|
||||
}
|
||||
|
||||
QStringList ProFileEvaluator::absolutePathValues(
|
||||
|
||||
Reference in New Issue
Block a user