forked from qt-creator/qt-creator
Fix memory leak in QtVersions parsing of qmake.conf
Reviewed-By: ossi
This commit is contained in:
@@ -742,7 +742,8 @@ ProItem::ProItemReturn ProFileEvaluator::Private::visitEndProFile(ProFile * pro)
|
|||||||
m_lineNo = pro->lineNumber();
|
m_lineNo = pro->lineNumber();
|
||||||
if (m_profileStack.count() == 1 && !m_oldPath.isEmpty()) {
|
if (m_profileStack.count() == 1 && !m_oldPath.isEmpty()) {
|
||||||
const QString &mkspecDirectory = propertyValue(QLatin1String("QMAKE_MKSPECS"));
|
const QString &mkspecDirectory = propertyValue(QLatin1String("QMAKE_MKSPECS"));
|
||||||
if (!mkspecDirectory.isEmpty() && m_parsePreAndPostFiles) {
|
if (!mkspecDirectory.isEmpty()) {
|
||||||
|
if (m_parsePreAndPostFiles) {
|
||||||
bool cumulative = m_cumulative;
|
bool cumulative = m_cumulative;
|
||||||
m_cumulative = false;
|
m_cumulative = false;
|
||||||
|
|
||||||
@@ -766,6 +767,8 @@ ProItem::ProItemReturn ProFileEvaluator::Private::visitEndProFile(ProFile * pro)
|
|||||||
if (finished)
|
if (finished)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
m_cumulative = cumulative;
|
||||||
|
}
|
||||||
|
|
||||||
foreach (ProBlock *itm, m_replaceFunctions)
|
foreach (ProBlock *itm, m_replaceFunctions)
|
||||||
itm->deref();
|
itm->deref();
|
||||||
@@ -773,8 +776,6 @@ ProItem::ProItemReturn ProFileEvaluator::Private::visitEndProFile(ProFile * pro)
|
|||||||
foreach (ProBlock *itm, m_testFunctions)
|
foreach (ProBlock *itm, m_testFunctions)
|
||||||
itm->deref();
|
itm->deref();
|
||||||
m_testFunctions.clear();
|
m_testFunctions.clear();
|
||||||
|
|
||||||
m_cumulative = cumulative;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_profileStack.pop();
|
m_profileStack.pop();
|
||||||
|
|||||||
Reference in New Issue
Block a user