Because VDomDocument::find checks for unique id we must use temp cache. ref #905
--HG-- branch : release
This commit is contained in:
parent
a087e9ea74
commit
989a16b789
|
@ -231,10 +231,14 @@ QDomElement VDomDocument::elementById(quint32 id, const QString &tagName)
|
||||||
|
|
||||||
if (tagName.isEmpty())
|
if (tagName.isEmpty())
|
||||||
{
|
{
|
||||||
if (VDomDocument::find(m_elementIdCache, this->documentElement(), id))
|
// Because VDomDocument::find checks for unique id we must use temp cache
|
||||||
|
QHash<quint32, QDomElement> tmpCache;
|
||||||
|
if (VDomDocument::find(tmpCache, this->documentElement(), id))
|
||||||
{
|
{
|
||||||
return m_elementIdCache.value(id);
|
m_elementIdCache = tmpCache;
|
||||||
|
return m_elementIdCache.value(id);
|
||||||
}
|
}
|
||||||
|
m_elementIdCache = tmpCache;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user