summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/codeparser.cpp14
-rw-r--r--tools/qdoc3/codeparser.h1
-rw-r--r--tools/qdoc3/config.h1
-rw-r--r--tools/qdoc3/htmlgenerator.cpp26
-rw-r--r--tools/qdoc3/main.cpp22
-rw-r--r--tools/qdoc3/test/classic.css20
6 files changed, 48 insertions, 36 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);
diff --git a/tools/qdoc3/codeparser.h b/tools/qdoc3/codeparser.h
index 019e806..0152b9c 100644
--- a/tools/qdoc3/codeparser.h
+++ b/tools/qdoc3/codeparser.h
@@ -87,6 +87,7 @@ class CodeParser
private:
static QList<CodeParser *> parsers;
+ static bool showInternal;
};
QT_END_NAMESPACE
diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h
index 9443f0d..7eb7048 100644
--- a/tools/qdoc3/config.h
+++ b/tools/qdoc3/config.h
@@ -147,6 +147,7 @@ class Config
#define CONFIG_QHP "qhp"
#define CONFIG_QUOTINGINFORMATION "quotinginformation"
#define CONFIG_SLOW "slow"
+#define CONFIG_SHOWINTERNAL "showinternal"
#define CONFIG_SOURCEDIRS "sourcedirs"
#define CONFIG_SOURCES "sources"
#define CONFIG_SPURIOUS "spurious"
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index c2d2d22..007f62a 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -1158,16 +1158,14 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
QStringList names;
names << (*m)->name();
if ((*m)->type() == Node::Function) {
- const FunctionNode *func =
- reinterpret_cast<const FunctionNode *>(*m);
+ const FunctionNode *func = reinterpret_cast<const FunctionNode *>(*m);
if (func->metaness() == FunctionNode::Ctor ||
- func->metaness() == FunctionNode::Dtor
- || func->overloadNumber() != 1)
+ func->metaness() == FunctionNode::Dtor ||
+ func->overloadNumber() != 1)
names.clear();
}
else if ((*m)->type() == Node::Property) {
- const PropertyNode *prop =
- reinterpret_cast<const PropertyNode *>(*m);
+ const PropertyNode *prop = reinterpret_cast<const PropertyNode *>(*m);
if (!prop->getters().isEmpty() &&
!names.contains(prop->getters().first()->name()))
names << prop->getters().first()->name();
@@ -1177,14 +1175,13 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
names << prop->resetters().first()->name();
}
else if ((*m)->type() == Node::Enum) {
- const EnumNode *enume =
- reinterpret_cast<const EnumNode *>(*m);
+ const EnumNode *enume = reinterpret_cast<const EnumNode*>(*m);
if (enume->flagsType())
names << enume->flagsType()->name();
foreach (const QString &enumName,
- enume->doc().enumItemNames().toSet()
- - enume->doc().omitEnumItemNames().toSet())
+ enume->doc().enumItemNames().toSet() -
+ enume->doc().omitEnumItemNames().toSet())
names << plainCode(marker->markedUpEnumValue(enumName,
enume));
}
@@ -2365,7 +2362,7 @@ void HtmlGenerator::generateSectionList(const Section& section,
}
if (name_alignment) {
out() << "<table border=\"0\" cellpadding=\"0\" "
- << "cellspacing=\"0\">\n";
+ << "cellspacing=\"0\" width=\"100%\">\n";
}
else {
if (twoColumn)
@@ -2501,8 +2498,8 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
static const QString linkTag("link");
for (int i = 0, n = src.size(); i < n;) {
if (src.at(i) == charLangle && src.at(i + 1).unicode() == '@') {
- if (nameAlignment && (i != 0))
- html += "&nbsp;</td><td class=\"memItemRight\" valign=\"bottom\">";
+ if (nameAlignment) // && (i != 0)) Why was this here?
+ html += "</td><td class=\"memItemRight\" valign=\"bottom\">";
i += 2;
if (parseArg(src, linkTag, &i, n, &arg, &par1)) {
QString link = linkForNode(
@@ -3314,7 +3311,8 @@ void HtmlGenerator::findAllClasses(const InnerNode *node)
if ((*c)->access() != Node::Private && (*c)->url().isEmpty()) {
if ((*c)->type() == Node::Class && !(*c)->doc().isEmpty()) {
QString className = (*c)->name();
- if ((*c)->parent() && (*c)->parent()->type() == Node::Namespace &&
+ if ((*c)->parent() &&
+ (*c)->parent()->type() == Node::Namespace &&
!(*c)->parent()->name().isEmpty())
className = (*c)->parent()->name()+"::"+className;
diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp
index 514d06e..995d037 100644
--- a/tools/qdoc3/main.cpp
+++ b/tools/qdoc3/main.cpp
@@ -95,6 +95,7 @@ static const struct {
};
static bool slow = false;
+static bool showInternal = false;
static QStringList defines;
static QHash<QString, Tree *> trees;
@@ -120,14 +121,16 @@ static void printHelp()
{
Location::information(tr("Usage: qdoc [options] file1.qdocconf ...\n"
"Options:\n"
- " -help "
+ " -help "
"Display this information and exit\n"
- " -version "
+ " -version "
"Display version of qdoc and exit\n"
- " -D<name> "
+ " -D<name> "
"Define <name> as a macro while parsing sources\n"
- " -slow "
- "Turn on features that slow down qdoc") );
+ " -slow "
+ "Turn on features that slow down qdoc"
+ " -showinternal "
+ "Include stuff marked internal") );
}
/*!
@@ -160,6 +163,8 @@ static void processQdocconfFile(const QString &fileName)
++i;
}
config.setStringList(CONFIG_SLOW, QStringList(slow ? "true" : "false"));
+ config.setStringList(CONFIG_SHOWINTERNAL,
+ QStringList(showInternal ? "true" : "false"));
/*
With the default configuration values in place, load
@@ -326,10 +331,11 @@ static void processQdocconfFile(const QString &fileName)
/*
Generate the XML tag file, if it was requested.
*/
+
QString tagFile = config.getString(CONFIG_TAGFILE);
if (!tagFile.isEmpty())
tree->generateTagFile(tagFile);
-
+
tree->setVersion("");
Generator::terminate();
CodeParser::terminate();
@@ -342,7 +348,6 @@ static void processQdocconfFile(const QString &fileName)
foreach (QTranslator *translator, translators)
delete translator;
-
delete tree;
}
@@ -426,6 +431,9 @@ int main(int argc, char **argv)
else if (opt == "-slow") {
slow = true;
}
+ else if (opt == "-showinternal") {
+ showInternal = true;
+ }
else {
qdocFiles.append(opt);
}
diff --git a/tools/qdoc3/test/classic.css b/tools/qdoc3/test/classic.css
index aef6c5d..e018dc6 100644
--- a/tools/qdoc3/test/classic.css
+++ b/tools/qdoc3/test/classic.css
@@ -73,16 +73,16 @@ table td.memItemLeft {
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
- border-top-color: #66bc29;
- border-right-color: #66bc29;
- border-bottom-color: #66bc29;
- border-left-color: #66bc29;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
- font-size: 80%;
+ font-size: 100%;
white-space: nowrap
}
table td.memItemRight {
@@ -92,16 +92,16 @@ table td.memItemRight {
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
- border-top-color: #66bc29;
- border-right-color: #66bc29;
- border-bottom-color: #66bc29;
- border-left-color: #66bc29;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
- font-size: 80%;
+ font-size: 100%;
}
table tr.odd {