From 0491a7a2984393266e3be48f09b20a8deab9f4c8 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 1 Nov 2013 15:13:12 +0100 Subject: qdoc: Don't include internal QML types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QML types marked \internal were appearing in the "All QML Types" list. These links were dead because the pages for these internal types were not being created, which was correct. Now these internal QML types no longer appear in the list. Task-number: QTBUG-34506 Change-Id: I1d005459e84ed9a2afae94b797b9d39aa3e517f3 Reviewed-by: Topi Reiniƶ Reviewed-by: Jerome Pasion --- src/tools/qdoc/main.cpp | 2 +- src/tools/qdoc/qdocdatabase.cpp | 4 ++-- src/tools/qdoc/qdocdatabase.h | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/tools/qdoc') diff --git a/src/tools/qdoc/main.cpp b/src/tools/qdoc/main.cpp index ffaef904b7..398d188464 100644 --- a/src/tools/qdoc/main.cpp +++ b/src/tools/qdoc/main.cpp @@ -362,7 +362,7 @@ static void processQdocconfFile(const QString &fileName) */ QDocDatabase* qdb = QDocDatabase::qdocDB(); qdb->setVersion(config.getString(CONFIG_VERSION)); - + qdb->setShowInternal(config.getBool(CONFIG_SHOWINTERNAL)); /* By default, the only output format is HTML. */ diff --git a/src/tools/qdoc/qdocdatabase.cpp b/src/tools/qdoc/qdocdatabase.cpp index f2ecb02a2f..1011a3ac97 100644 --- a/src/tools/qdoc/qdocdatabase.cpp +++ b/src/tools/qdoc/qdocdatabase.cpp @@ -62,7 +62,7 @@ QDocDatabase* QDocDatabase::qdocDB_ = NULL; It constructs a singleton Tree object with this qdoc database pointer. */ -QDocDatabase::QDocDatabase() +QDocDatabase::QDocDatabase() : showInternal_(false) { tree_ = new Tree(this); } @@ -423,7 +423,7 @@ void QDocDatabase::findAllClasses(const InnerNode* node) { NodeList::const_iterator c = node->childNodes().constBegin(); while (c != node->childNodes().constEnd()) { - if ((*c)->access() != Node::Private) { + if ((*c)->access() != Node::Private && (!(*c)->isInternal() || showInternal_)) { if ((*c)->type() == Node::Class && !(*c)->doc().isEmpty()) { QString className = (*c)->name(); if ((*c)->parent() && diff --git a/src/tools/qdoc/qdocdatabase.h b/src/tools/qdoc/qdocdatabase.h index 5786fa0664..4decba5f79 100644 --- a/src/tools/qdoc/qdocdatabase.h +++ b/src/tools/qdoc/qdocdatabase.h @@ -200,6 +200,7 @@ class QDocDatabase void insertOpenNamespace(const QString& path) { openNamespaces_.insert(path); } FunctionNode* findNodeInOpenNamespace(const QStringList& parentPath, const FunctionNode* clone); Node* findNodeInOpenNamespace(QStringList& path, Node::Type type, Node::SubType subtype); + void setShowInternal(bool value) { showInternal_ = value; } /* debugging functions */ void printModules() const; @@ -220,6 +221,7 @@ class QDocDatabase private: static QDocDatabase* qdocDB_; + bool showInternal_; QString version_; QDocMultiMap masterMap_; Tree* tree_; -- cgit v1.2.3