diff options
author | Martin Smith <martin.smith@qt.io> | 2018-03-01 12:56:57 +0100 |
---|---|---|
committer | Martin Smith <martin.smith@qt.io> | 2018-03-01 13:40:13 +0000 |
commit | 6a0670780794021b1efe226c5028bc071ad5d5d3 (patch) | |
tree | c6bc53373f7bffbfd93d78e0e5e0b598340caa62 /src/qdoc/generator.cpp | |
parent | be547f747023190770e0ffcfd9729f0b24f7c3c4 (diff) | |
download | qttools-6a0670780794021b1efe226c5028bc071ad5d5d3.tar.gz |
qdoc: Don't output undocumented functions from Q_OBJECT
Earlier, a test was added to qdoc to ensure that functions added
to class declarations by macros like Q_OBJECT would not cause qdoc
to output warnings that the functions were not documented. But the
undocumented functions were still listed in the documentation. This
update keeps them out of the documentation.
Task-number: QTBUG-66742
Change-Id: I10014341fc7b870ef937ef7f0a303ccc301bf8b5
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/qdoc/generator.cpp')
-rw-r--r-- | src/qdoc/generator.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/qdoc/generator.cpp b/src/qdoc/generator.cpp index 1256477c2..1e28ce5ef 100644 --- a/src/qdoc/generator.cpp +++ b/src/qdoc/generator.cpp @@ -836,24 +836,7 @@ void Generator::generateBody(const Node *node, CodeMarker *marker) out() << "</p>"; } else if (!node->isWrapper() && !quiet && !node->isReimplemented()) { - bool report = true; - /* - These are the member function names added by macros. - Usually they are not documented, but they can be - documented, so this test avoids reporting an error - if they are not documented. - - But maybe we should generate a standard text for each - of them? - */ - if (node->name().startsWith(QLatin1String("qt_")) || - node->name() == QLatin1String("metaObject") || - node->name() == QLatin1String("tr") || - node->name() == QLatin1String("trUtf8") || - node->name() == QLatin1String("d_func")) { - report = false; - } - if (report) + if (!func->isIgnored()) // undocumented functions added by Q_OBJECT node->location().warning(tr("No documentation for '%1'").arg(node->plainSignature())); } } |