forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -914,8 +914,11 @@ void QMakeEvaluator::visitProVariable(
|
||||
m_featureRoots = 0;
|
||||
else if (varName == statics.strQMAKESPEC) {
|
||||
if (!values(varName).isEmpty()) {
|
||||
m_qmakespec = values(varName).first().toQString();
|
||||
m_featureRoots = 0;
|
||||
QString spec = values(varName).first().toQString();
|
||||
if (IoUtils::isAbsolutePath(spec)) {
|
||||
m_qmakespec = spec;
|
||||
m_featureRoots = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef PROEVALUATOR_FULL
|
||||
@@ -1129,8 +1132,11 @@ bool QMakeEvaluator::loadSpecInternal()
|
||||
// the source of the qmake.conf at the end of the default/qmake.conf in
|
||||
// the QMAKESPEC_ORIGINAL variable.
|
||||
const ProString &orig_spec = first(ProKey("QMAKESPEC_ORIGINAL"));
|
||||
if (!orig_spec.isEmpty())
|
||||
m_qmakespec = orig_spec.toQString();
|
||||
if (!orig_spec.isEmpty()) {
|
||||
QString spec = orig_spec.toQString();
|
||||
if (IoUtils::isAbsolutePath(spec))
|
||||
m_qmakespec = spec;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
valuesRef(ProKey("QMAKESPEC")) = ProString(m_qmakespec);
|
||||
|
Reference in New Issue
Block a user