summaryrefslogtreecommitdiff
path: root/src/xmlpatterns/expr/qevaluationcache_tpl_p.h
diff options
context:
space:
mode:
authorAri Koivisto <ari.koivisto@gmail.com>2012-10-03 19:29:33 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-14 22:58:42 +0200
commit3c3f8dd7c6f2a681ed11e941568ecc569377c389 (patch)
treedf7462a8f313355424c76b19221652dd187fd442 /src/xmlpatterns/expr/qevaluationcache_tpl_p.h
parentdf4020d9d2580a1a4790a43af689d2b5132cf1e8 (diff)
downloadqtxmlpatterns-3c3f8dd7c6f2a681ed11e941568ecc569377c389.tar.gz
Fix XmlListModel memory leak
This is a forward port of a memory leak fix committed to Qt 4.8 (QTBUG-15191). The fix includes all changes except changes to qitem_p.h which has changed in Qt 5.0. Additionally fix qxmlquery autotest failure introduced in the original Qt 4.8 patch. Task-number: QTBUG-27357 Change-Id: Ia0e916d9d6bccea014d28920cef48d6e47e8f04f Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Diffstat (limited to 'src/xmlpatterns/expr/qevaluationcache_tpl_p.h')
-rw-r--r--src/xmlpatterns/expr/qevaluationcache_tpl_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xmlpatterns/expr/qevaluationcache_tpl_p.h b/src/xmlpatterns/expr/qevaluationcache_tpl_p.h
index 286c077..7aa0ae1 100644
--- a/src/xmlpatterns/expr/qevaluationcache_tpl_p.h
+++ b/src/xmlpatterns/expr/qevaluationcache_tpl_p.h
@@ -49,7 +49,7 @@ template<bool IsForGlobal>
EvaluationCache<IsForGlobal>::EvaluationCache(const Expression::Ptr &op,
const VariableDeclaration::Ptr &varDecl,
const VariableSlotID aSlot) : SingleContainer(op)
- , m_declaration(varDecl)
+ , m_declaration(varDecl.constData())
, m_varSlot(aSlot)
{
Q_ASSERT(m_declaration);