summaryrefslogtreecommitdiffstats
path: root/src/qdoc/node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qdoc/node.cpp')
-rw-r--r--src/qdoc/node.cpp33
1 files changed, 31 insertions, 2 deletions
diff --git a/src/qdoc/node.cpp b/src/qdoc/node.cpp
index 9740f984f..d91d473ce 100644
--- a/src/qdoc/node.cpp
+++ b/src/qdoc/node.cpp
@@ -165,6 +165,29 @@ QString Node::plainFullName(const Node* relative) const
}
/*!
+ Constructs and returns the node's fully qualified signature
+ by recursively ascending the parent links and prepending each
+ parent name + "::" to the plain signature. The return type is
+ not included.
+ */
+QString Node::plainSignature() const
+{
+ if (name_.isEmpty())
+ return QLatin1String("global");
+
+ QString fullName;
+ const Node* node = this;
+ while (node) {
+ fullName.prepend(node->signature(false, true));
+ if (node->parent()->name().isEmpty())
+ break;
+ fullName.prepend(QLatin1String("::"));
+ node = node->parent();
+ }
+ return fullName;
+}
+
+/*!
Constructs and returns this node's full name.
*/
QString Node::fullName(const Node* relative) const
@@ -1951,6 +1974,9 @@ FunctionNode::FunctionNode(Aggregate *parent, const QString& name)
attached_(false),
privateSignal_(false),
overload_(false),
+ isDeleted_(false),
+ isDefaulted_(false),
+ isFinal_(false),
reimplementedFrom_(0)
{
setGenus(Node::CPP);
@@ -1974,6 +2000,9 @@ FunctionNode::FunctionNode(NodeType type, Aggregate *parent, const QString& name
attached_(attached),
privateSignal_(false),
overload_(false),
+ isDeleted_(false),
+ isDefaulted_(false),
+ isFinal_(false),
reimplementedFrom_(0)
{
setGenus(Node::QML);
@@ -2133,10 +2162,10 @@ QStringList FunctionNode::reconstructParameters(bool values) const
is true, the default values of the parameters are included, if
present.
*/
-QString FunctionNode::signature(bool values) const
+QString FunctionNode::signature(bool values, bool noReturnType) const
{
QString s;
- if (!returnType().isEmpty())
+ if (!noReturnType && !returnType().isEmpty())
s = returnType() + QLatin1Char(' ');
s += name() + QLatin1Char('(');
QStringList reconstructedParameters = reconstructParameters(values);