Fix error in VDomDocument::elementById.
Searching in cache did not check tag if provided.
This commit is contained in:
parent
b756460da8
commit
4fa2b76f01
|
@ -275,10 +275,20 @@ QDomElement VDomDocument::elementById(quint32 id, const QString &tagName, bool u
|
|||
{
|
||||
const QDomElement e = m_elementIdCache.value(id);
|
||||
if (e.parentNode().nodeType() != QDomNode::BaseNode)
|
||||
{
|
||||
if (not tagName.isEmpty())
|
||||
{
|
||||
if (e.tagName() == tagName)
|
||||
{
|
||||
return e;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (updateCache)
|
||||
{ // Cached missed
|
||||
|
|
Loading…
Reference in New Issue
Block a user