summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2019-07-04 14:43:30 +0200
committerTopi Reinio <topi.reinio@qt.io>2019-07-04 18:22:32 +0200
commit0119d409921c88ed5e9b0883098fc84c4526fb37 (patch)
tree31a2ab2a075823f8e960a87c0af704c22f1acaf9
parent41fab09dc14cad4a688fffd2d9572648e74a31a9 (diff)
downloadqttools-0119d409921c88ed5e9b0883098fc84c4526fb37.tar.gz
qdoc: Revise ClassNode::docMustBeGenerated()
Earlier implementation was incorrect as it omitted generating output for classes that have only non-function members. Also, it incorrectly generated output for private, non-documented classes. Simplify the criteria for generating output; filtering based on the appearance of 'Private' string is not necessary for Qt, and may cause problems for projects external to Qt. Fixes: QTBUG-76892 Change-Id: Ieee6a693f887cbc0244753298f13a9b411801d56 Reviewed-by: Martin Smith <martin.smith@qt.io>
-rw-r--r--src/qdoc/node.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/qdoc/node.cpp b/src/qdoc/node.cpp
index c1388f726..6618a7e6d 100644
--- a/src/qdoc/node.cpp
+++ b/src/qdoc/node.cpp
@@ -1875,15 +1875,11 @@ FunctionNode* ClassNode::findOverriddenFunction(const FunctionNode* fn)
*/
bool ClassNode::docMustBeGenerated() const
{
- if (isInternal() || isPrivate() || isDontDocument() ||
- declLocation().fileName().endsWith(QLatin1String("_p.h")))
+ if (!hasDoc() || isPrivate() || isInternal() || isDontDocument())
return false;
- if (count() == 0)
- return false;
- if (name().contains(QLatin1String("Private")))
- return false;
- if (functionCount_ == 0)
+ if (declLocation().fileName().endsWith(QLatin1String("_p.h")))
return false;
+
return true;
}