1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#include "variablenode.h"
5
6QT_BEGIN_NAMESPACE
7
8/*!
9 Clone this node on the heap and make the clone a child of
10 \a parent.
11
12 Returns a pointer to the clone.
13 */
14Node *VariableNode::clone(Aggregate *parent)
15{
16 auto *vn = new VariableNode(*this); // shallow copy
17 vn->setParent(nullptr);
18 parent->addChild(child: vn);
19
20 return vn;
21}
22
23QT_END_NAMESPACE
24

source code of qttools/src/qdoc/qdoc/variablenode.cpp