Because VDomDocument::find checks for unique id we must use temp cache. ref #905
(grafted from 660b90b7a2c64837148237902a3fb11e73ef49f0) --HG-- branch : develop
This commit is contained in:
parent
c782bf37db
commit
ac6224d2df
|
@ -232,10 +232,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