summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/codeparser.cpp
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2010-04-29 11:49:43 (GMT)
committerMartin Smith <msmith@trolltech.com>2010-04-29 11:49:43 (GMT)
commit04925d40d960a394345f83ef51cce7b547431b92 (patch)
treedd0acdf9524026f29a3c88731d93c8fdc6b83744 /tools/qdoc3/codeparser.cpp
parent229251d0bc0024b78a8c0669a09836289c02a7cd (diff)
downloadQt-04925d40d960a394345f83ef51cce7b547431b92.zip
Qt-04925d40d960a394345f83ef51cce7b547431b92.tar.gz
Qt-04925d40d960a394345f83ef51cce7b547431b92.tar.bz2
qdoc: Added breadcrumbs to examples. Coolio.
Doesn't work in a few cases because of non-standard naming of things.
Diffstat (limited to 'tools/qdoc3/codeparser.cpp')
-rw-r--r--tools/qdoc3/codeparser.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/qdoc3/codeparser.cpp b/tools/qdoc3/codeparser.cpp
index a717ff1..78804eb 100644
--- a/tools/qdoc3/codeparser.cpp
+++ b/tools/qdoc3/codeparser.cpp
@@ -70,6 +70,7 @@ QT_BEGIN_NAMESPACE
QList<CodeParser *> CodeParser::parsers;
bool CodeParser::showInternal = false;
+QMap<QString,QString> CodeParser::nameToTitle;
/*!
The constructor adds this code parser to the static
@@ -250,10 +251,21 @@ void CodeParser::processCommonMetaCommand(const Location &location,
if (node->type() == Node::Fake) {
FakeNode *fake = static_cast<FakeNode *>(node);
fake->setTitle(arg);
+ nameToTitle.insert(fake->name(),arg);
+ qDebug() << "NAME TO TITLE:" << fake->name() << arg;
}
else
location.warning(tr("Ignored '\\%1'").arg(COMMAND_TITLE));
}
}
+/*!
+ Find the page title given the page \a name and return it.
+ */
+const QString CodeParser::titleFromName(const QString& name)
+{
+ const QString t = nameToTitle.value(name);
+ return t;
+}
+
QT_END_NAMESPACE