avoid that a bad qmakespec path crashes the evaluator
assigning a relative path to QMAKESPEC or QMAKESPEC_ORIGINAL (in the qt4 windows legacy code) would lead to an assert further down the line. just ignore such attempts silently. Task-number: QTCREATORBUG-8477 Change-Id: Ie53d0ef004c743284b85de4e89f112e0161ff4b7 Reviewed-by: Daniel Teske <daniel.teske@digia.com> (cherry picked from qtcreator/e017a1dc8b2030e509d6198315e9f6a9869667e7) Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
parent
b4e6409fea
commit
193c6d2ebb
@ -912,8 +912,11 @@ void QMakeEvaluator::visitProVariable(
|
|||||||
m_featureRoots = 0;
|
m_featureRoots = 0;
|
||||||
else if (varName == statics.strQMAKESPEC) {
|
else if (varName == statics.strQMAKESPEC) {
|
||||||
if (!values(varName).isEmpty()) {
|
if (!values(varName).isEmpty()) {
|
||||||
m_qmakespec = values(varName).first().toQString();
|
QString spec = values(varName).first().toQString();
|
||||||
m_featureRoots = 0;
|
if (IoUtils::isAbsolutePath(spec)) {
|
||||||
|
m_qmakespec = spec;
|
||||||
|
m_featureRoots = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef PROEVALUATOR_FULL
|
#ifdef PROEVALUATOR_FULL
|
||||||
@ -1159,8 +1162,11 @@ bool QMakeEvaluator::loadSpecInternal()
|
|||||||
// the source of the qmake.conf at the end of the default/qmake.conf in
|
// the source of the qmake.conf at the end of the default/qmake.conf in
|
||||||
// the QMAKESPEC_ORIGINAL variable.
|
// the QMAKESPEC_ORIGINAL variable.
|
||||||
const ProString &orig_spec = first(ProKey("QMAKESPEC_ORIGINAL"));
|
const ProString &orig_spec = first(ProKey("QMAKESPEC_ORIGINAL"));
|
||||||
if (!orig_spec.isEmpty())
|
if (!orig_spec.isEmpty()) {
|
||||||
m_qmakespec = orig_spec.toQString();
|
QString spec = orig_spec.toQString();
|
||||||
|
if (IoUtils::isAbsolutePath(spec))
|
||||||
|
m_qmakespec = spec;
|
||||||
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
valuesRef(ProKey("QMAKESPEC")) = ProString(m_qmakespec);
|
valuesRef(ProKey("QMAKESPEC")) = ProString(m_qmakespec);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user