summaryrefslogtreecommitdiff
path: root/src/svg/qsvgnode.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-11-20 13:18:15 +0100
committerLiang Qi <liang.qi@qt.io>2017-11-20 13:18:15 +0100
commitf84d0cc0165047183466a956589315ad41e946d0 (patch)
tree9dedb5dfde84d4a2732b79e454a48d92158efdbe /src/svg/qsvgnode.cpp
parent4dd6b2bfebf02223ef498bf52ce354c628cc9607 (diff)
parent984ba6977201f8fbd94d44a2b67519e1faf458cc (diff)
downloadqtsvg-f84d0cc0165047183466a956589315ad41e946d0.tar.gz
Merge remote-tracking branch 'origin/5.10' into dev
Change-Id: I7e158268343c5d92d666d266a87095f1154714dd
Diffstat (limited to 'src/svg/qsvgnode.cpp')
-rw-r--r--src/svg/qsvgnode.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/svg/qsvgnode.cpp b/src/svg/qsvgnode.cpp
index e504522..14aaea4 100644
--- a/src/svg/qsvgnode.cpp
+++ b/src/svg/qsvgnode.cpp
@@ -57,6 +57,17 @@ QSvgNode::~QSvgNode()
}
+bool QSvgNode::isDescendantOf(const QSvgNode *parent) const
+{
+ const QSvgNode *n = this;
+ while (n) {
+ if (n == parent)
+ return true;
+ n = n->m_parent;
+ }
+ return false;
+}
+
void QSvgNode::appendStyleProperty(QSvgStyleProperty *prop, const QString &id)
{
//qDebug()<<"appending "<<prop->type()<< " ("<< id <<") "<<"to "<<this<<this->type();