summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2013-11-01 15:13:12 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-07 10:00:19 +0100
commit0491a7a2984393266e3be48f09b20a8deab9f4c8 (patch)
treebfb250e59da62f1f42aa2b27d27c4037b2941c8b /src/tools/qdoc
parent170da92d02f2e81bafc9efdf76b2c4facf6486d0 (diff)
qdoc: Don't include internal QML types
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ƶ <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/tools/qdoc')
-rw-r--r--src/tools/qdoc/main.cpp2
-rw-r--r--src/tools/qdoc/qdocdatabase.cpp4
-rw-r--r--src/tools/qdoc/qdocdatabase.h2
3 files changed, 5 insertions, 3 deletions
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_;