ProParser: Plug raw data leak

QProcessEnvironment caches keys, so we must not pass it QStrings created with
fromRawData()

Task-number: QTCREATORBUG-9142
Change-Id: I29fade02f3bc4110fafb1b04d44f2e653951a2ae
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtcreator/99f15f1706868c4b2f84bc4164451bd69b3b8188)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Daniel Teske 2013-09-06 15:14:38 +02:00 committed by Oswald Buddenhagen
parent bbf2f1dbbf
commit 771724d2f4

View File

@ -452,7 +452,7 @@ void QMakeEvaluator::evaluateExpression(
break; }
case TokEnvVar: {
const ProString &var = pro->getStr(tokPtr);
const ProString &val = ProString(m_option->getEnv(var.toQString(m_tmp1)));
const ProString &val = ProString(m_option->getEnv(var.toQString()));
debugMsg(2, "env var %s => %s", dbgStr(var), dbgStr(val));
addStr(val, ret, pending, joined);
break; }