diff options
author | Martin Smith <[email protected]> | 2012-11-06 13:44:35 +0100 |
---|---|---|
committer | Martin Smith <[email protected]> | 2012-11-06 14:09:59 +0100 |
commit | 2efbf2dbbe1ff65c0624ba05a432d0e0e4a7d92f (patch) | |
tree | 8c698bf1660c7e40a5b12e5452d403fe7c3f505d /src/tools/qdoc/qdocdatabase.cpp | |
parent | c808dd27459e030fde0577feb8ba06e3bd465526 (diff) |
qdoc: Added module attribute to most index elements
The index file generated by qdoc when it is run in
-prepare mode has been modified so that most elements
have a module attribute. The value of the module
attribute either came from an \inmodule command, or
it is the value of the project variable specified in
the qdocconf file that was read by qdoc.
Task number: QTBUG-27626
Change-Id: I44198bbbc1738fafc110c6b905eb1d67bc745323
Reviewed-by: Jerome Pasion <[email protected]>
Diffstat (limited to 'src/tools/qdoc/qdocdatabase.cpp')
-rw-r--r-- | src/tools/qdoc/qdocdatabase.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/tools/qdoc/qdocdatabase.cpp b/src/tools/qdoc/qdocdatabase.cpp index cb93a92d336..d5dbb843861 100644 --- a/src/tools/qdoc/qdocdatabase.cpp +++ b/src/tools/qdoc/qdocdatabase.cpp @@ -344,8 +344,9 @@ void QDocDatabase::findAllClasses(const InnerNode* node) } QString serviceName = (static_cast<const ClassNode *>(*c))->serviceName(); - if (!serviceName.isEmpty()) + if (!serviceName.isEmpty()) { serviceClasses_.insert(serviceName, *c); + } } else if ((*c)->type() == Node::Document && (*c)->subType() == Node::QmlClass && @@ -418,12 +419,10 @@ void QDocDatabase::findAllNamespaces(const InnerNode* node) if ((*c)->isInnerNode()) { findAllNamespaces(static_cast<const InnerNode *>(*c)); if ((*c)->type() == Node::Namespace) { - const NamespaceNode* nspace = static_cast<const NamespaceNode *>(*c); // Ensure that the namespace's name is not empty (the root // namespace has no name). - if (!nspace->name().isEmpty()) { - namespaceIndex_.insert(nspace->name(), *c); - } + if (!(*c)->name().isEmpty()) + namespaceIndex_.insert((*c)->name(), *c); } } } |