From f3476d3ae2380bb10781371c9e07ebeaea9c9b86 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 15 May 2012 13:48:29 +0200 Subject: [PATCH] qdoc: Don't include internal QML properties in output QML properties marked internal were still appearing in the the HTML output. Also, the title for QML type pages was not correct in the help project writer. Change-Id: Icaad7cefce77a4af70796bc185c99a3035fb17c8 Reviewed-by: Casper van Donderen --- src/tools/qdoc/codemarker.cpp | 3 ++- src/tools/qdoc/codeparser.cpp | 11 +++++++++++ src/tools/qdoc/cppcodemarker.cpp | 5 +---- src/tools/qdoc/helpprojectwriter.cpp | 5 ++++- src/tools/qdoc/htmlgenerator.cpp | 2 -- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/tools/qdoc/codemarker.cpp b/src/tools/qdoc/codemarker.cpp index 00094a1..c0a781b 100644 --- a/src/tools/qdoc/codemarker.cpp +++ b/src/tools/qdoc/codemarker.cpp @@ -397,8 +397,9 @@ void CodeMarker::insert(FastSection &fastSection, bool inheritedMember = false; if (!node->relates()) { if (node->parent() != (const InnerNode*)fastSection.innerNode && !node->parent()->isAbstract()) { - if (node->type() != Node::QmlProperty) + if (node->type() != Node::QmlProperty) { inheritedMember = true; + } } } diff --git a/src/tools/qdoc/codeparser.cpp b/src/tools/qdoc/codeparser.cpp index 1d0c486..71a82a7 100644 --- a/src/tools/qdoc/codeparser.cpp +++ b/src/tools/qdoc/codeparser.cpp @@ -274,6 +274,17 @@ void CodeParser::processCommonMetaCommand(const Location& location, if (!showInternal) { node->setAccess(Node::Private); node->setStatus(Node::Internal); + if (node->subType() == Node::QmlPropertyGroup) { + const QmlPropGroupNode* qpgn = static_cast(node); + NodeList::ConstIterator p = qpgn->childNodes().begin(); + while (p != qpgn->childNodes().end()) { + if ((*p)->type() == Node::QmlProperty) { + (*p)->setAccess(Node::Private); + (*p)->setStatus(Node::Internal); + } + ++p; + } + } } } else if (command == COMMAND_REENTRANT) { diff --git a/src/tools/qdoc/cppcodemarker.cpp b/src/tools/qdoc/cppcodemarker.cpp index 20c3316..9bfbebb 100644 --- a/src/tools/qdoc/cppcodemarker.cpp +++ b/src/tools/qdoc/cppcodemarker.cpp @@ -1125,11 +1125,8 @@ QString CppCodeMarker::addMarkUp(const QString &in, This function is for documenting QML properties. It returns the list of documentation sections for the children of the \a qmlClassNode. - - Currently, it only handles QML property groups. */ -QList
CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, - SynopsisStyle style) +QList
CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, SynopsisStyle style) { QList
sections; if (qmlClassNode) { diff --git a/src/tools/qdoc/helpprojectwriter.cpp b/src/tools/qdoc/helpprojectwriter.cpp index 590feba..c5e4f59 100644 --- a/src/tools/qdoc/helpprojectwriter.cpp +++ b/src/tools/qdoc/helpprojectwriter.cpp @@ -534,7 +534,10 @@ void HelpProjectWriter::writeNode(HelpProject &project, QXmlStreamWriter &writer writer.writeStartElement("section"); writer.writeAttribute("ref", href); - writer.writeAttribute("title", fakeNode->fullTitle()); + if (fakeNode->subType() == Node::QmlClass) + writer.writeAttribute("title", tr("%1 Type Reference").arg(fakeNode->fullTitle())); + else + writer.writeAttribute("title", fakeNode->fullTitle()); if ((fakeNode->subType() == Node::HeaderFile) || (fakeNode->subType() == Node::QmlClass)) { // Write subsections for all members, obsolete members and Qt 3 diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index 4fa2bb6..11cfbff 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -4025,8 +4025,6 @@ void HtmlGenerator::endLink() /*! Generates the summary for the \a section. Only used for sections of QML element documentation. - - Currently handles only the QML property group. */ void HtmlGenerator::generateQmlSummary(const Section& section, const Node *relative, -- 2.7.4