qdoc: Don't output docs for internal things

This update to the Generator base class prevents qdoc
from writing an html file for anything that is marked
\internal if the user has not set the showinternal flag.

Task-number: QTBUG-34269
Change-Id: Ia60109d4568447501370bb9d4c1344a48f9b6113
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
This commit is contained in:
Martin Smith 2013-10-30 11:55:53 +01:00 committed by The Qt Project
parent 0b152831cc
commit 45b10ee02a
2 changed files with 5 additions and 0 deletions

View File

@ -136,6 +136,7 @@ Generator::Generator()
inSectionHeading_(false),
inTableHeader_(false),
threeColumnEnumValueTable_(true),
showInternal_(false),
numTableRows_(0)
{
qdb_ = QDocDatabase::qdocDB();
@ -964,6 +965,8 @@ void Generator::generateInnerNode(InnerNode* node)
return;
if (node->isIndexNode())
return;
if (node->isInternal() && !showInternal_)
return;
if (node->type() == Node::Document) {
DocNode* docNode = static_cast<DocNode*>(node);
@ -1666,6 +1669,7 @@ void Generator::augmentImageDirs(QSet<QString>& moreImageDirs)
void Generator::initializeGenerator(const Config& config)
{
config_ = &config;
showInternal_ = config.getBool(CONFIG_SHOWINTERNAL);
}
bool Generator::matchAhead(const Atom *atom, Atom::Type expectedAtomType)

View File

@ -239,6 +239,7 @@ private:
bool inSectionHeading_;
bool inTableHeader_;
bool threeColumnEnumValueTable_;
bool showInternal_;
int numTableRows_;
QString link_;
QString sectionNumber_;