diff options
author | Martin Smith <msmith@trolltech.com> | 2010-02-11 14:14:53 (GMT) |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2010-02-11 14:14:53 (GMT) |
commit | 8750eae466f066ebb50a565b8efe90f7ce7ee360 (patch) | |
tree | fcb2bf1f42b808306dc8ed96b34879b3b65ffcb2 /tools | |
parent | 638b4edeba905facb2ae7a841214b048c0010008 (diff) | |
download | Qt-8750eae466f066ebb50a565b8efe90f7ce7ee360.zip Qt-8750eae466f066ebb50a565b8efe90f7ce7ee360.tar.gz Qt-8750eae466f066ebb50a565b8efe90f7ce7ee360.tar.bz2 |
qdoc3: Completed handling of the new \pagekeywords command.
Task: QTBUG-7877
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qdoc3/htmlgenerator.cpp | 11 | ||||
-rw-r--r-- | tools/qdoc3/node.h | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index ca0cd7e..e341a03 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -4384,10 +4384,13 @@ bool HtmlGenerator::generatePageElement(QXmlStreamWriter& writer, return true; if (node->access() == Node::Private) return false; + if (!node->isInnerNode()) + return false; QString title; QString rawTitle; QString fullTitle; + const InnerNode* inner = static_cast<const InnerNode*>(node); writer.writeStartElement("page"); QXmlStreamAttributes attributes; @@ -4407,7 +4410,6 @@ bool HtmlGenerator::generatePageElement(QXmlStreamWriter& writer, } case Node::Namespace: { - const InnerNode* inner = static_cast<const InnerNode*>(node); rawTitle = marker->plainName(inner); fullTitle = marker->plainFullName(inner); title = rawTitle + " Namespace Reference"; @@ -4420,6 +4422,13 @@ bool HtmlGenerator::generatePageElement(QXmlStreamWriter& writer, writer.writeAttribute("id",t); writer.writeStartElement("pageWords"); writer.writeCharacters(title); + if (!inner->pageKeywords().isEmpty()) { + const QStringList& w = inner->pageKeywords(); + for (int i = 0; i < w.size(); ++i) { + writer.writeCharacters(" "); + writer.writeCharacters(w.at(i).toLocal8Bit().constData()); + } + } writer.writeEndElement(); writer.writeStartElement("pageTitle"); writer.writeCharacters(title); diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index 6a540d4..021a052 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -257,7 +257,7 @@ class InnerNode : public Node QStringList primaryKeys(); QStringList secondaryKeys(); - QStringList pageKeywords() { return pageKeywds; } + const QStringList& pageKeywords() const { return pageKeywds; } virtual void addPageKeywords(const QString& t) { pageKeywds << t; } protected: |