diff options
author | Martin Smith <martin.smith@theqtcompany.com> | 2016-02-12 14:54:59 +0100 |
---|---|---|
committer | Martin Smith <martin.smith@theqtcompany.com> | 2016-02-26 12:05:56 +0000 |
commit | 8237d6d1171d7d7d677eada7d49ab7b5d85b09e7 (patch) | |
tree | b80e6b96b45bd1fe2e0bd90598aa5bf124891250 /src/qdoc/codemarker.cpp | |
parent | 7b9f7620b6da02ae1809a5255979c79533ec8480 (diff) | |
download | qttools-8237d6d1171d7d7d677eada7d49ab7b5d85b09e7.tar.gz |
qdoc: Avoid unnecessary qdoc warnings
Generates default docs when special class member functions are declared
but not documented, thereby avoiding the "No documentation for..." error.
The member functions now handled are the destructor, the copy constructor,
the move-copy constructor, and the default constructor.
Change-Id: I9ddd7841b1dfec907ab3c2ccd7636dc898df1fce
Task-number: QTBUG-50630
Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com>
Diffstat (limited to 'src/qdoc/codemarker.cpp')
-rw-r--r-- | src/qdoc/codemarker.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/qdoc/codemarker.cpp b/src/qdoc/codemarker.cpp index d1f186e9a..99b9a47c3 100644 --- a/src/qdoc/codemarker.cpp +++ b/src/qdoc/codemarker.cpp @@ -368,10 +368,10 @@ QString CodeMarker::sortName(const Node *node, const QString* name) if (node->type() == Node::Function) { const FunctionNode *func = static_cast<const FunctionNode *>(node); QString sortNo; - if (func->metaness() == FunctionNode::Ctor) { + if (func->isSomeCtor()) { sortNo = QLatin1String("C"); } - else if (func->metaness() == FunctionNode::Dtor) { + else if (func->isDtor()) { sortNo = QLatin1String("D"); } else { @@ -424,16 +424,13 @@ void CodeMarker::insert(FastSection &fastSection, } else if (node->type() == Node::Function) { FunctionNode *func = (FunctionNode *) node; - irrelevant = (inheritedMember - && (func->metaness() == FunctionNode::Ctor || - func->metaness() == FunctionNode::Dtor)); + irrelevant = (inheritedMember && (func->isSomeCtor() || func->isDtor())); } - else if (node->type() == Node::Class || node->type() == Node::Enum - || node->type() == Node::Typedef) { + else if (node->isClass() || node->isEnumType() || node->isTypedef()) { irrelevant = (inheritedMember && style != Subpage); - if (!irrelevant && style == Detailed && node->type() == Node::Typedef) { - const TypedefNode* typedeffe = static_cast<const TypedefNode*>(node); - if (typedeffe->associatedEnum()) + if (!irrelevant && style == Detailed && node->isTypedef()) { + const TypedefNode* tdn = static_cast<const TypedefNode*>(node); + if (tdn->associatedEnum()) irrelevant = true; } } |