summaryrefslogtreecommitdiffstats
path: root/src/xml/dom/qdom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xml/dom/qdom.cpp')
-rw-r--r--src/xml/dom/qdom.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
index c16fd03613..0171fc7bef 100644
--- a/src/xml/dom/qdom.cpp
+++ b/src/xml/dom/qdom.cpp
@@ -172,14 +172,16 @@ public:
bool isDocumentType() const { return nodeType() == QDomNode::DocumentTypeNode; }
bool isElement() const { return nodeType() == QDomNode::ElementNode; }
bool isEntityReference() const { return nodeType() == QDomNode::EntityReferenceNode; }
- bool isText() const { return (nodeType() == QDomNode::TextNode)
- || (nodeType() == QDomNode::CDATASectionNode); }
+ bool isText() const { const QDomNode::NodeType nt = nodeType();
+ return (nt == QDomNode::TextNode)
+ || (nt == QDomNode::CDATASectionNode); }
bool isEntity() const { return nodeType() == QDomNode::EntityNode; }
bool isNotation() const { return nodeType() == QDomNode::NotationNode; }
bool isProcessingInstruction() const { return nodeType() == QDomNode::ProcessingInstructionNode; }
- bool isCharacterData() const { return (nodeType() == QDomNode::CharacterDataNode)
- || (nodeType() == QDomNode::TextNode)
- || (nodeType() == QDomNode::CommentNode); }
+ bool isCharacterData() const { const QDomNode::NodeType nt = nodeType();
+ return (nt == QDomNode::CharacterDataNode)
+ || (nt == QDomNode::TextNode)
+ || (nt == QDomNode::CommentNode); }
bool isComment() const { return nodeType() == QDomNode::CommentNode; }
virtual QDomNode::NodeType nodeType() const { return QDomNode::BaseNode; }