summaryrefslogtreecommitdiffstats
path: root/src/qdoc/qdoc/src/qdoc/variablenode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qdoc/qdoc/src/qdoc/variablenode.cpp')
-rw-r--r--src/qdoc/qdoc/src/qdoc/variablenode.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/qdoc/qdoc/src/qdoc/variablenode.cpp b/src/qdoc/qdoc/src/qdoc/variablenode.cpp
new file mode 100644
index 000000000..11c8363f3
--- /dev/null
+++ b/src/qdoc/qdoc/src/qdoc/variablenode.cpp
@@ -0,0 +1,23 @@
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+#include "variablenode.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ Clone this node on the heap and make the clone a child of
+ \a parent.
+
+ Returns a pointer to the clone.
+ */
+Node *VariableNode::clone(Aggregate *parent)
+{
+ auto *vn = new VariableNode(*this); // shallow copy
+ vn->setParent(nullptr);
+ parent->addChild(vn);
+
+ return vn;
+}
+
+QT_END_NAMESPACE