From 5697af33e8a6f284df7035339bbe85a911e8097d Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 7 Apr 2016 12:35:08 +0300 Subject: [PATCH] Fixed tests. --HG-- branch : develop --- src/libs/ifc/xml/vdomdocument.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/libs/ifc/xml/vdomdocument.cpp b/src/libs/ifc/xml/vdomdocument.cpp index 3605e8335..c7a9ee5a1 100644 --- a/src/libs/ifc/xml/vdomdocument.cpp +++ b/src/libs/ifc/xml/vdomdocument.cpp @@ -698,7 +698,7 @@ bool VDomDocument::setTagText(const QString &tag, const QString &text) if (domNode.isNull() == false && domNode.isElement()) { const QDomElement domElement = domNode.toElement(); - setTagText(domElement, text); + return setTagText(domElement, text); } } return false; @@ -711,11 +711,10 @@ bool VDomDocument::setTagText(const QDomElement &domElement, const QString &text { QDomElement parent = domElement.parentNode().toElement(); QDomElement newTag = createElement(domElement.tagName()); - if (not text.isEmpty()) - { - const QDomText newTagText = createTextNode(text); - newTag.appendChild(newTagText); - } + + const QDomText newTagText = createTextNode(text); + newTag.appendChild(newTagText); + parent.replaceChild(newTag, domElement); return true; }