summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/codeparser.cpp
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2009-05-29 11:43:48 (GMT)
committerMartin Smith <msmith@trolltech.com>2009-05-29 11:44:19 (GMT)
commitb34d9b67fbdc6bf74f7ada972dd9b35153f47202 (patch)
tree545bf7e3f466731b30ead41d20dab8b378183fff /tools/qdoc3/codeparser.cpp
parentfe3b9390872bfb03a94be8c17cdc0ce6946369bb (diff)
downloadQt-b34d9b67fbdc6bf74f7ada972dd9b35153f47202.zip
Qt-b34d9b67fbdc6bf74f7ada972dd9b35153f47202.tar.gz
Qt-b34d9b67fbdc6bf74f7ada972dd9b35153f47202.tar.bz2
Added the -showinternal flag to qdoc.
When you set -showinternal on the command line, qdoc will include everything marked \internal in the documentation. This flag is not very useful at the moment for two reasons: (1) It generates hundreds of qdoc errors because most of the things marked with \internal don't have any documentation anyway, or the documentation has other errors in it that weren't being detected because of the \internal. (2) There is a bus error toward the end, which I haven't tracked down yet. For now, use -showinternal at your own risk.
Diffstat (limited to 'tools/qdoc3/codeparser.cpp')
-rw-r--r--tools/qdoc3/codeparser.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/qdoc3/codeparser.cpp b/tools/qdoc3/codeparser.cpp
index f0ff27e..20b37a0 100644
--- a/tools/qdoc3/codeparser.cpp
+++ b/tools/qdoc3/codeparser.cpp
@@ -47,6 +47,7 @@
#include "codeparser.h"
#include "node.h"
#include "tree.h"
+#include "config.h"
QT_BEGIN_NAMESPACE
@@ -67,6 +68,7 @@ QT_BEGIN_NAMESPACE
#define COMMAND_TITLE Doc::alias(QLatin1String("title"))
QList<CodeParser *> CodeParser::parsers;
+bool CodeParser::showInternal = false;
/*!
The constructor adds this code parser to the static
@@ -87,11 +89,11 @@ CodeParser::~CodeParser()
}
/*!
- Initializing a code parser is trivial.
+ Initialize the code parser base class.
*/
-void CodeParser::initializeParser(const Config & /* config */)
+void CodeParser::initializeParser(const Config& config)
{
- // nothing.
+ showInternal = config.getBool(QLatin1String(CONFIG_SHOWINTERNAL));
}
/*!
@@ -217,8 +219,10 @@ void CodeParser::processCommonMetaCommand(const Location &location,
node->setStatus(Node::Preliminary);
}
else if (command == COMMAND_INTERNAL) {
- node->setAccess(Node::Private);
- node->setStatus(Node::Internal);
+ if (!showInternal) {
+ node->setAccess(Node::Private);
+ node->setStatus(Node::Internal);
+ }
}
else if (command == COMMAND_REENTRANT) {
node->setThreadSafeness(Node::Reentrant);