diff options
author | Topi Reinio <topi.reinio@qt.io> | 2020-10-15 11:19:12 +0200 |
---|---|---|
committer | Topi Reinio <topi.reinio@qt.io> | 2020-11-09 23:30:45 +0100 |
commit | 4cdcfe335eba1142c6b9a56408b88caa6660974c (patch) | |
tree | b0f835a83305d6826e67101cf300bd7c28d2b404 | |
parent | 12f8258efcab39a571df4cbb8cacf5bfc2eb8a82 (diff) |
qdoc: Unify generated documentation between \typedef and \typealias
\typedef can be used as a substitute for \typealias for documenting
aliases. Since they are identical in terms of usage, unify also the
way they are documented:
- Remove 'typedef' and '(alias)' from both the summary and details
sections, making both appear as types.
- Remove automatically generated 'This is a type alias for ...' note
for type aliases. This typically resulted in duplicate statements.
- Use '-typedef' anchor suffix for both.
- Use 'typedef' as element for both in .index files and webxml output
format.
- Add template parameters for type aliases for DocBook generator;
these were previously missing.
Fixes: QTBUG-87622
Change-Id: I93986a2dc91c3c3dff9e21f5bf5cf19d0b55c4df
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
27 files changed, 78 insertions, 140 deletions
diff --git a/src/qdoc/cppcodemarker.cpp b/src/qdoc/cppcodemarker.cpp index 341b8b651..a52a42b16 100644 --- a/src/qdoc/cppcodemarker.cpp +++ b/src/qdoc/cppcodemarker.cpp @@ -98,7 +98,6 @@ QString CppCodeMarker::markedUpSynopsis(const Node *node, const Node * /* relati const PropertyNode *property; const VariableNode *variable; const EnumNode *enume; - const TypedefNode *typedeff; QString synopsis; QString name; @@ -213,22 +212,17 @@ QString CppCodeMarker::markedUpSynopsis(const Node *node, const Node * /* relati } break; case Node::TypeAlias: - if (style == Section::Summary) - synopsis = "(alias) "; - else if (style == Section::Details) { + if (style == Section::Details) { QString templateDecl = node->templateDecl(); if (!templateDecl.isEmpty()) - synopsis = templateDecl + QLatin1Char(' '); + synopsis += templateDecl + QLatin1Char(' '); } synopsis += name; break; case Node::Typedef: - typedeff = static_cast<const TypedefNode *>(node); - if (typedeff->associatedEnum()) { - synopsis = "flags " + name; - } else { - synopsis = "typedef " + name; - } + if (static_cast<const TypedefNode *>(node)->associatedEnum()) + synopsis = "flags "; + synopsis += name; break; case Node::Property: property = static_cast<const PropertyNode *>(node); diff --git a/src/qdoc/docbookgenerator.cpp b/src/qdoc/docbookgenerator.cpp index 9b127ae26..156da8009 100644 --- a/src/qdoc/docbookgenerator.cpp +++ b/src/qdoc/docbookgenerator.cpp @@ -2147,8 +2147,6 @@ void DocBookGenerator::generateBody(const Node *node) // Reimplements clause and type alias info precede body text if (fn && !fn->overridesThis().isEmpty()) generateReimplementsClause(fn); - else if (node->isTypeAlias()) - generateAddendum(node, TypeAlias, nullptr, false); else if (node->isProperty()) { if (static_cast<const PropertyNode *>(node)->propertyType() != PropertyNode::Standard) generateAddendum(node, BindableProperty, nullptr, false); @@ -3307,12 +3305,17 @@ void DocBookGenerator::generateSynopsis(const Node *node, const Node *relative, } writer->writeCharacters(synopsis); } break; + case Node::TypeAlias: { + if (style == Section::Details) { + QString templateDecl = node->templateDecl(); + if (!templateDecl.isEmpty()) + writer->writeCharacters(templateDecl + QLatin1Char(' ')); + } + generateSynopsisName(node, relative, generateNameLink); + } break; case Node::Typedef: { - const auto typedeff = static_cast<const TypedefNode *>(node); - if (typedeff->associatedEnum()) + if (static_cast<const TypedefNode *>(node)->associatedEnum()) writer->writeCharacters("flags "); - else - writer->writeCharacters("typedef "); generateSynopsisName(node, relative, generateNameLink); } break; case Node::Property: { @@ -3476,24 +3479,6 @@ void DocBookGenerator::generateAddendum(const Node *node, Addendum type, CodeMar } break; } - case TypeAlias: - { - if (!node->isTypeAlias()) - return; - writer->writeStartElement(dbNamespace, "para"); - const auto *ta = static_cast<const TypeAliasNode *>(node); - writer->writeCharacters("This is a type alias for "); - if (ta->aliasedNode() && ta->aliasedNode()->isInAPI()) - generateSimpleLink(linkForNode(ta->aliasedNode(), nullptr), - ta->aliasedNode()->plainFullName(ta->parent())); - else - writer->writeTextElement(dbNamespace, "code", ta->aliasedType()); - - writer->writeCharacters("."); - writer->writeEndElement(); // para - newLine(); - break; - } case BindableProperty: { const Node *linkNode; diff --git a/src/qdoc/generator.cpp b/src/qdoc/generator.cpp index 81f0583f6..6be40cce7 100644 --- a/src/qdoc/generator.cpp +++ b/src/qdoc/generator.cpp @@ -625,17 +625,14 @@ QString Generator::fullDocumentLocation(const Node *node, bool useSubdir) case Node::Enum: anchorRef = QLatin1Char('#') + node->name() + "-enum"; break; - case Node::TypeAlias: - anchorRef = QLatin1Char('#') + node->name() + "-alias"; - break; case Node::Typedef: { - const TypedefNode *tdef = static_cast<const TypedefNode *>(node); - if (tdef->associatedEnum()) { + const auto *tdef = static_cast<const TypedefNode *>(node); + if (tdef->associatedEnum()) return fullDocumentLocation(tdef->associatedEnum()); - } + } Q_FALLTHROUGH(); + case Node::TypeAlias: anchorRef = QLatin1Char('#') + node->name() + "-typedef"; break; - } case Node::Property: anchorRef = QLatin1Char('#') + node->name() + "-prop"; break; @@ -806,8 +803,6 @@ void Generator::generateBody(const Node *node, CodeMarker *marker) // Reimplements clause and type alias info precede body text if (fn && !fn->overridesThis().isEmpty()) generateReimplementsClause(fn, marker); - else if (node->isTypeAlias()) - generateAddendum(node, TypeAlias, marker, false); else if (node->isProperty()) { if (static_cast<const PropertyNode *>(node)->propertyType() != PropertyNode::Standard) generateAddendum(node, BindableProperty, marker); @@ -1407,22 +1402,6 @@ void Generator::generateAddendum(const Node *node, Addendum type, CodeMarker *ma } break; } - case TypeAlias: - { - if (!node->isTypeAlias()) - return; - const auto *ta = static_cast<const TypeAliasNode *>(node); - text << "This is a type alias for "; - if (ta->aliasedNode() && ta->aliasedNode()->isInAPI()) { - text << Atom(Atom::LinkNode, CodeMarker::stringForNode(ta->aliasedNode())) - << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) - << Atom(Atom::String, ta->aliasedNode()->plainFullName(ta->parent())) - << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK) << "."; - } else { - text << Atom(Atom::String, ta->aliasedType()) << "."; - } - break; - } case BindableProperty: { text << "This property supports " @@ -2186,9 +2165,8 @@ QString Generator::typeString(const Node *node) case Node::Enum: return "enum"; case Node::Typedef: - return "typedef"; case Node::TypeAlias: - return "alias"; + return "typedef"; case Node::Function: { const auto fn = static_cast<const FunctionNode *>(node); switch (fn->metaness()) { diff --git a/src/qdoc/generator.h b/src/qdoc/generator.h index 6a8e1fe98..194c3aefb 100644 --- a/src/qdoc/generator.h +++ b/src/qdoc/generator.h @@ -62,7 +62,6 @@ public: PrivateSignal, QmlSignalHandler, AssociatedProperties, - TypeAlias, BindableProperty }; diff --git a/src/qdoc/node.cpp b/src/qdoc/node.cpp index 354d8fec5..c9aae40c0 100644 --- a/src/qdoc/node.cpp +++ b/src/qdoc/node.cpp @@ -900,7 +900,6 @@ QString Node::nodeTypeString(NodeType t) case ExternalPage: return QLatin1String("external page"); case TypeAlias: - return QLatin1String("alias"); case Typedef: return QLatin1String("typedef"); case Function: diff --git a/src/qdoc/qdocindexfiles.cpp b/src/qdoc/qdocindexfiles.cpp index ecae2810b..e48b6e1e5 100644 --- a/src/qdoc/qdocindexfiles.cpp +++ b/src/qdoc/qdocindexfiles.cpp @@ -463,20 +463,15 @@ void QDocIndexFiles::readIndexSection(QXmlStreamReader &reader, Node *current, hasReadChildren = true; } else if (elementName == QLatin1String("typedef")) { - node = new TypedefNode(parent, name); - - if (!indexUrl.isEmpty()) - location = Location(indexUrl + QLatin1Char('/') + parent->name().toLower() + ".html"); - else if (!indexUrl.isNull()) - location = Location(parent->name().toLower() + ".html"); + if (attributes.hasAttribute("aliasedtype")) + node = new TypeAliasNode(parent, name, attributes.value(QLatin1String("aliasedtype")).toString()); + else + node = new TypedefNode(parent, name); - } else if (elementName == QLatin1String("alias")) { - node = new TypeAliasNode(parent, name, attributes.value(QLatin1String("aliasedtype")).toString()); if (!indexUrl.isEmpty()) location = Location(indexUrl + QLatin1Char('/') + parent->name().toLower() + ".html"); else if (!indexUrl.isNull()) location = Location(parent->name().toLower() + ".html"); - } else if (elementName == QLatin1String("property")) { PropertyNode *propNode = new PropertyNode(parent, name); node = propNode; @@ -912,12 +907,10 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter &writer, Node *node, case Node::Enum: nodeName = "enum"; break; + case Node::TypeAlias: case Node::Typedef: nodeName = "typedef"; break; - case Node::TypeAlias: - nodeName = "alias"; - break; case Node::Property: nodeName = "property"; break; diff --git a/src/qdoc/xmlgenerator.cpp b/src/qdoc/xmlgenerator.cpp index 19761c31e..1ccaaf6cb 100644 --- a/src/qdoc/xmlgenerator.cpp +++ b/src/qdoc/xmlgenerator.cpp @@ -242,15 +242,14 @@ QString XmlGenerator::refForNode(const Node *node) case Node::Enum: ref = node->name() + "-enum"; break; - case Node::TypeAlias: - ref = node->name() + "-alias"; - break; case Node::Typedef: { - const auto tdn = static_cast<const TypedefNode *>(node); - if (tdn->associatedEnum()) - return refForNode(tdn->associatedEnum()); + const auto *tdf = static_cast<const TypedefNode *>(node); + if (tdf->associatedEnum()) + return refForNode(tdf->associatedEnum()); + } Q_FALLTHROUGH(); + case Node::TypeAlias: ref = node->name() + "-typedef"; - } break; + break; case Node::Function: { const auto fn = static_cast<const FunctionNode *>(node); switch (fn->metaness()) { diff --git a/tests/auto/qdoc/generatedoutput/expected_output/crossmodule/testtype-members.html b/tests/auto/qdoc/generatedoutput/expected_output/crossmodule/testtype-members.html index 889ba1438..0a32e4e60 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/crossmodule/testtype-members.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/crossmodule/testtype-members.html @@ -11,9 +11,9 @@ <h1 class="title">List of All Members for TestType</h1> <p>This is the complete list of members for <a href="testtype.html">TestType</a>, including inherited members.</p> <ul> -<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#DerivedType-alias">DerivedType</a></b></span></li> -<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#NotTypedef-alias">NotTypedef</a></b></span></li> -<li class="fn">typedef <span class="name"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></span></li> +<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#DerivedType-typedef">DerivedType</a></b></span></li> +<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#NotTypedef-typedef">NotTypedef</a></b></span></li> +<li class="fn"><span class="name"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></span></li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b></span>(TestQDoc::Test &&) : TestQDoc::Test &</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#funcPtr">funcPtr</a></b></span>(bool, const char *) : void (*)(bool)</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#inlineFunction">inlineFunction</a></b></span>()</li> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml index dc69ea38a..50116fae7 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml @@ -42,7 +42,7 @@ <db:section xml:id="member-type-documentation"> <db:title>Member Type Documentation</db:title> <db:section xml:id="SomeType-typedef"> -<db:title>Test::typedef SomeType</db:title> +<db:title>Test::SomeType</db:title> <db:typedefsynopsis> <db:type>SomeType</db:type><db:synopsisinfo db:role="access">public</db:synopsisinfo> <db:synopsisinfo db:role="status">active</db:synopsisinfo> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-testderived.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-testderived.xml index 066b29e32..ca439c38d 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-testderived.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-testderived.xml @@ -41,7 +41,7 @@ </db:section> <db:section xml:id="member-type-documentation"> <db:title>Member Type Documentation</db:title> -<db:section xml:id="DerivedType-alias"> +<db:section xml:id="DerivedType-typedef"> <db:title>[alias] TestDerived::DerivedType</db:title> <db:typedefsynopsis> <db:type>DerivedType</db:type><db:synopsisinfo db:role="access">public</db:synopsisinfo> @@ -49,10 +49,9 @@ <db:synopsisinfo db:role="threadsafeness">unspecified</db:synopsisinfo> <db:synopsisinfo db:role="module">TestCPP</db:synopsisinfo> </db:typedefsynopsis> -<db:para>This is a type alias for <db:link xlink:href="testqdoc-test.xml#SomeType-typedef">TestQDoc::Test::SomeType</db:link>.</db:para> <db:para>An aliased typedef.</db:para> </db:section> -<db:section xml:id="NotTypedef-alias"> +<db:section xml:id="NotTypedef-typedef"> <db:title>[alias] TestDerived::NotTypedef</db:title> <db:typedefsynopsis> <db:type>NotTypedef</db:type><db:synopsisinfo db:role="access">public</db:synopsisinfo> @@ -60,7 +59,6 @@ <db:synopsisinfo db:role="threadsafeness">unspecified</db:synopsisinfo> <db:synopsisinfo db:role="module">TestCPP</db:synopsisinfo> </db:typedefsynopsis> -<db:para>This is a type alias for <db:code>int</db:code>.</db:para> <db:para>I'm an alias, not a typedef.</db:para> </db:section> </db:section> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/dontdocument/dontdocument.qhp b/tests/auto/qdoc/generatedoutput/expected_output/dontdocument/dontdocument.qhp index 91a59da47..7efcc1e8d 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/dontdocument/dontdocument.qhp +++ b/tests/auto/qdoc/generatedoutput/expected_output/dontdocument/dontdocument.qhp @@ -27,8 +27,8 @@ <keyword name="Test" id="TestQDoc::Test" ref="testqdoc-test.html"/> <keyword name="Test::SomeType" id="Test::SomeType" ref="testqdoc-test.html#SomeType-typedef"/> <keyword name="TestDerived" id="TestQDoc::TestDerived" ref="testqdoc-testderived.html"/> - <keyword name="TestDerived::DerivedType" id="TestDerived::DerivedType" ref="testqdoc-testderived.html#DerivedType-alias"/> - <keyword name="TestDerived::NotTypedef" id="TestDerived::NotTypedef" ref="testqdoc-testderived.html#NotTypedef-alias"/> + <keyword name="TestDerived::DerivedType" id="TestDerived::DerivedType" ref="testqdoc-testderived.html#DerivedType-typedef"/> + <keyword name="TestDerived::NotTypedef" id="TestDerived::NotTypedef" ref="testqdoc-testderived.html#NotTypedef-typedef"/> <keyword name="TestQDoc" id="TestQDoc" ref="testqdoc.html"/> <keyword name="anotherObsoleteMember" id="Test::anotherObsoleteMember" ref="testqdoc-test-obsolete.html#anotherObsoleteMember"/> <keyword name="deprecatedMember" id="Test::deprecatedMember" ref="testqdoc-test-obsolete.html#deprecatedMember"/> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/html/testqdoc-testderived.webxml b/tests/auto/qdoc/generatedoutput/expected_output/html/testqdoc-testderived.webxml index 7711b09df..fdcbb4649 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/html/testqdoc-testderived.webxml +++ b/tests/auto/qdoc/generatedoutput/expected_output/html/testqdoc-testderived.webxml @@ -8,16 +8,16 @@ <function name="virtualFun" fullname="TestQDoc::TestDerived::virtualFun" href="testqdoc-testderived.html#virtualFun" status="active" access="public" location="testcpp.h" documented="true" meta="plain" virtual="virtual" const="false" static="false" final="false" override="true" type="void" signature="void virtualFun() override"> <description/> </function> - <alias name="DerivedType" fullname="TestQDoc::TestDerived::DerivedType" href="testqdoc-testderived.html#DerivedType-alias" status="active" access="public" location="testcpp.h" documented="true" aliasedtype="Test::SomeType"> + <typedef name="DerivedType" fullname="TestQDoc::TestDerived::DerivedType" href="testqdoc-testderived.html#DerivedType-typedef" status="active" access="public" location="testcpp.h" documented="true" aliasedtype="Test::SomeType"> <description> <para>An aliased typedef.</para> </description> - </alias> - <alias name="NotTypedef" fullname="TestQDoc::TestDerived::NotTypedef" href="testqdoc-testderived.html#NotTypedef-alias" status="active" access="public" location="testcpp.h" documented="true" aliasedtype="int"> + </typedef> + <typedef name="NotTypedef" fullname="TestQDoc::TestDerived::NotTypedef" href="testqdoc-testderived.html#NotTypedef-typedef" status="active" access="public" location="testcpp.h" documented="true" aliasedtype="int"> <description> <para>I'm an alias, not a typedef.</para> </description> - </alias> + </typedef> </class> </document> </WebXML> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc-test.html b/tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc-test.html index 0d0c4081e..59d471cad 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc-test.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc-test.html @@ -36,7 +36,7 @@ target_link_libraries(mytarget PUBLIC Qt::QDocTest)</td></tr><tr><td class="memI <a name="public-types"></a> <h2 id="public-types">Public Types</h2> <div class="table"><table class="alignedsummary"> -<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></td></tr> +<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></td></tr> </table></div> <a name="public-functions"></a> <h2 id="public-functions">Public Functions</h2> @@ -74,7 +74,7 @@ target_link_libraries(mytarget PUBLIC Qt::QDocTest)</td></tr><tr><td class="memI <div class="types"> <h2>Member Type Documentation</h2> <!-- $$$SomeType --> -<h3 class="fn" id="SomeType-typedef"><a name="SomeType-typedef"></a>typedef Test::<span class="name">SomeType</span></h3> +<h3 class="fn" id="SomeType-typedef"><a name="SomeType-typedef"></a>Test::<span class="name">SomeType</span></h3> <p>A typedef.</p> <!-- @@@SomeType --> </div> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/properties-docbook/testqdoc-testderived.xml b/tests/auto/qdoc/generatedoutput/expected_output/properties-docbook/testqdoc-testderived.xml index 8e76081d3..44d167b59 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/properties-docbook/testqdoc-testderived.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/properties-docbook/testqdoc-testderived.xml @@ -41,7 +41,7 @@ </db:section> <db:section xml:id="member-type-documentation"> <db:title>Member Type Documentation</db:title> -<db:section xml:id="DerivedType-alias"> +<db:section xml:id="DerivedType-typedef"> <db:title>[alias] TestDerived::DerivedType</db:title> <db:typedefsynopsis> <db:type>DerivedType</db:type><db:synopsisinfo db:role="access">public</db:synopsisinfo> @@ -49,10 +49,9 @@ <db:synopsisinfo db:role="threadsafeness">unspecified</db:synopsisinfo> <db:synopsisinfo db:role="module">TestCPP</db:synopsisinfo> </db:typedefsynopsis> -<db:para>This is a type alias for <db:link xlink:href="testqdoc-test.xml#SomeType-typedef">TestQDoc::Test::SomeType</db:link>.</db:para> <db:para>An aliased typedef.</db:para> </db:section> -<db:section xml:id="NotTypedef-alias"> +<db:section xml:id="NotTypedef-typedef"> <db:title>[alias] TestDerived::NotTypedef</db:title> <db:typedefsynopsis> <db:type>NotTypedef</db:type><db:synopsisinfo db:role="access">public</db:synopsisinfo> @@ -60,7 +59,6 @@ <db:synopsisinfo db:role="threadsafeness">unspecified</db:synopsisinfo> <db:synopsisinfo db:role="module">TestCPP</db:synopsisinfo> </db:typedefsynopsis> -<db:para>This is a type alias for <db:code>int</db:code>.</db:para> <db:para>I'm an alias, not a typedef.</db:para> </db:section> </db:section> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/properties/testcpp.index b/tests/auto/qdoc/generatedoutput/expected_output/properties/testcpp.index index 5cee2e115..7d8f0c5eb 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/properties/testcpp.index +++ b/tests/auto/qdoc/generatedoutput/expected_output/properties/testcpp.index @@ -81,8 +81,8 @@ <function name="someProp" fullname="TestQDoc::TestDerived::someProp" href="testqdoc-testderived.html#someProp-prop" status="active" access="public" location="testcpp.h" meta="plain" virtual="non" const="false" static="false" final="false" override="false" associated-property="someProp" type="const QString &" signature="const QString & someProp()"/> <function name="virtualFun" fullname="TestQDoc::TestDerived::virtualFun" href="testqdoc-testderived.html#virtualFun" status="active" access="public" location="testcpp.h" documented="true" meta="plain" virtual="virtual" const="false" static="false" final="false" override="true" type="void" signature="void virtualFun() override"/> <struct name="QPrivateSignal" fullname="TestQDoc::TestDerived::QPrivateSignal" href="testqdoc-testderived-qprivatesignal.html" status="internal" access="private" location="testcpp.h"/> - <alias name="DerivedType" fullname="TestQDoc::TestDerived::DerivedType" href="testqdoc-testderived.html#DerivedType-alias" status="active" access="public" location="testcpp.h" documented="true" aliasedtype="Test::SomeType"/> - <alias name="NotTypedef" fullname="TestQDoc::TestDerived::NotTypedef" href="testqdoc-testderived.html#NotTypedef-alias" status="active" access="public" location="testcpp.h" documented="true" aliasedtype="int"/> + <typedef name="DerivedType" fullname="TestQDoc::TestDerived::DerivedType" href="testqdoc-testderived.html#DerivedType-typedef" status="active" access="public" location="testcpp.h" documented="true" aliasedtype="Test::SomeType"/> + <typedef name="NotTypedef" fullname="TestQDoc::TestDerived::NotTypedef" href="testqdoc-testderived.html#NotTypedef-typedef" status="active" access="public" location="testcpp.h" documented="true" aliasedtype="int"/> <property name="bindableProp" fullname="TestQDoc::TestDerived::bindableProp" href="testqdoc-testderived.html#bindableProp-prop" status="active" access="public" location="testcpp.h" documented="true" bindable="true"> <getter name="bindableProp"/> <setter name="setBindableProp"/> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived-members.html b/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived-members.html index 67bdf6a75..7e4dde4c5 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived-members.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived-members.html @@ -12,9 +12,9 @@ <p>This is the complete list of members for <a href="testqdoc-testderived.html">TestQDoc::TestDerived</a>, including inherited members.</p> <div class="table"><table class="propsummary"> <tr><td class="topAlign"><ul> -<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#DerivedType-alias">DerivedType</a></b></span></li> -<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#NotTypedef-alias">NotTypedef</a></b></span></li> -<li class="fn">typedef <span class="name"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></span></li> +<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#DerivedType-typedef">DerivedType</a></b></span></li> +<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#NotTypedef-typedef">NotTypedef</a></b></span></li> +<li class="fn"><span class="name"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></span></li> <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#bindableProp-prop">bindablePropChanged</a></b></span>()</li> <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#boolProp-prop">boolPropChanged</a></b></span>()</li> <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#emitSomething">emitSomething</a></b></span>()</li> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived.html b/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived.html index a5f180f5a..d083c6d9e 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived.html @@ -35,8 +35,8 @@ target_link_libraries(mytarget PUBLIC Qt::QDocTest)</td></tr><tr><td class="memI <a name="public-types"></a> <h2 id="public-types">Public Types</h2> <div class="table"><table class="alignedsummary"> -<tr><td class="memItemLeft rightAlign topAlign"> (alias) </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-testderived.html#DerivedType-alias">DerivedType</a></b></td></tr> -<tr><td class="memItemLeft rightAlign topAlign"> (alias) </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-testderived.html#NotTypedef-alias">NotTypedef</a></b></td></tr> +<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-testderived.html#DerivedType-typedef">DerivedType</a></b></td></tr> +<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-testderived.html#NotTypedef-typedef">NotTypedef</a></b></td></tr> </table></div> <a name="properties"></a> <h2 id="properties">Properties</h2> @@ -82,13 +82,11 @@ target_link_libraries(mytarget PUBLIC Qt::QDocTest)</td></tr><tr><td class="memI <div class="types"> <h2>Member Type Documentation</h2> <!-- $$$DerivedType --> -<h3 class="fn" id="DerivedType-alias"><a name="DerivedType-alias"></a><code>[alias] </code>TestDerived::<span class="name">DerivedType</span></h3> -<p>This is a type alias for <a href="testqdoc-test.html#SomeType-typedef">TestQDoc::Test::SomeType</a>.</p> +<h3 class="fn" id="DerivedType-typedef"><a name="DerivedType-typedef"></a><code>[alias] </code>TestDerived::<span class="name">DerivedType</span></h3> <p>An aliased typedef.</p> <!-- @@@DerivedType --> <!-- $$$NotTypedef --> -<h3 class="fn" id="NotTypedef-alias"><a name="NotTypedef-alias"></a><code>[alias] </code>TestDerived::<span class="name">NotTypedef</span></h3> -<p>This is a type alias for int.</p> +<h3 class="fn" id="NotTypedef-typedef"><a name="NotTypedef-typedef"></a><code>[alias] </code>TestDerived::<span class="name">NotTypedef</span></h3> <p>I'm an alias, not a typedef.</p> <!-- @@@NotTypedef --> </div> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/scopedenum-docbook/testqdoc-test.xml b/tests/auto/qdoc/generatedoutput/expected_output/scopedenum-docbook/testqdoc-test.xml index 9eb15331d..87974c004 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/scopedenum-docbook/testqdoc-test.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/scopedenum-docbook/testqdoc-test.xml @@ -92,7 +92,7 @@ </db:informaltable> </db:section> <db:section xml:id="SomeType-typedef"> -<db:title>Test::typedef SomeType</db:title> +<db:title>Test::SomeType</db:title> <db:typedefsynopsis> <db:type>SomeType</db:type><db:synopsisinfo db:role="access">public</db:synopsisinfo> <db:synopsisinfo db:role="status">active</db:synopsisinfo> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html b/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html index 2edea5283..5ca38ca20 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html @@ -37,7 +37,7 @@ target_link_libraries(mytarget PUBLIC Qt::QDocTest)</td></tr><tr><td class="memI <h2 id="public-types">Public Types</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> enum class </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#ScopedEnum-enum">ScopedEnum</a></b> { This, That, All }</td></tr> -<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></td></tr> +<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></td></tr> </table></div> <a name="public-functions"></a> <h2 id="public-functions">Public Functions</h2> @@ -83,7 +83,7 @@ target_link_libraries(mytarget PUBLIC Qt::QDocTest)</td></tr><tr><td class="memI </table></div> <!-- @@@ScopedEnum --> <!-- $$$SomeType --> -<h3 class="fn" id="SomeType-typedef"><a name="SomeType-typedef"></a>typedef Test::<span class="name">SomeType</span></h3> +<h3 class="fn" id="SomeType-typedef"><a name="SomeType-typedef"></a>Test::<span class="name">SomeType</span></h3> <p>A typedef.</p> <!-- @@@SomeType --> </div> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-test.html b/tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-test.html index 497777d44..33226f5ff 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-test.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-test.html @@ -37,8 +37,8 @@ target_link_libraries(mytarget PUBLIC Qt::QDocTest)</td></tr><tr><td class="memI <h2 id="public-types">Public Types</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> struct </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test-struct.html">Struct</a></b></td></tr> -<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></td></tr> -<tr><td class="memItemLeft rightAlign topAlign"> (alias) </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#Specialized-alias">Specialized</a></b></td></tr> +<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></td></tr> +<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#Specialized-typedef">Specialized</a></b></td></tr> </table></div> <a name="public-functions"></a> <h2 id="public-functions">Public Functions</h2> @@ -77,12 +77,11 @@ target_link_libraries(mytarget PUBLIC Qt::QDocTest)</td></tr><tr><td class="memI <div class="types"> <h2>Member Type Documentation</h2> <!-- $$$SomeType --> -<h3 class="fn" id="SomeType-typedef"><a name="SomeType-typedef"></a>typedef Test::<span class="name">SomeType</span></h3> +<h3 class="fn" id="SomeType-typedef"><a name="SomeType-typedef"></a>Test::<span class="name">SomeType</span></h3> <p>A typedef.</p> <!-- @@@SomeType --> <!-- $$$Specialized --> -<h3 class="fn" id="Specialized-alias"><a name="Specialized-alias"></a><code>[alias] </code>template<typename T> Test::<span class="name">Specialized</span></h3> -<p>This is a type alias for Struct<int, T>.</p> +<h3 class="fn" id="Specialized-typedef"><a name="Specialized-typedef"></a><code>[alias] </code>template<typename T> Test::<span class="name">Specialized</span></h3> <!-- @@@Specialized --> </div> <div class="func"> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/test.qhp b/tests/auto/qdoc/generatedoutput/expected_output/test.qhp index 67afc8481..957be6bf0 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/test.qhp +++ b/tests/auto/qdoc/generatedoutput/expected_output/test.qhp @@ -73,8 +73,8 @@ <keyword name="Test" id="TestQDoc::Test" ref="testqdoc-test.html"/> <keyword name="Test::SomeType" id="Test::SomeType" ref="testqdoc-test.html#SomeType-typedef"/> <keyword name="TestDerived" id="TestQDoc::TestDerived" ref="testqdoc-testderived.html"/> - <keyword name="TestDerived::DerivedType" id="TestDerived::DerivedType" ref="testqdoc-testderived.html#DerivedType-alias"/> - <keyword name="TestDerived::NotTypedef" id="TestDerived::NotTypedef" ref="testqdoc-testderived.html#NotTypedef-alias"/> + <keyword name="TestDerived::DerivedType" id="TestDerived::DerivedType" ref="testqdoc-testderived.html#DerivedType-typedef"/> + <keyword name="TestDerived::NotTypedef" id="TestDerived::NotTypedef" ref="testqdoc-testderived.html#NotTypedef-typedef"/> <keyword name="TestQDoc" id="TestQDoc" ref="testqdoc.html"/> <keyword name="Type" id="QML.Type" ref="qml-qdoc-test-type.html"/> <keyword name="Type" id="QML.QDoc.Test1.Type" ref="qml-qdoc-test-type.html"/> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/testcpp.index b/tests/auto/qdoc/generatedoutput/expected_output/testcpp.index index ac5c0228f..52fcf654b 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/testcpp.index +++ b/tests/auto/qdoc/generatedoutput/expected_output/testcpp.index @@ -49,8 +49,8 @@ </class> <class name="TestDerived" fullname="TestQDoc::TestDerived" href="testqdoc-testderived.html" status="active" access="public" location="testcpp.h" documented="true" bases="TestQDoc::Test" module="TestCPP" brief="A derived class in a namespace"> <function name="virtualFun" fullname="TestQDoc::TestDerived::virtualFun" href="testqdoc-testderived.html#virtualFun" status="active" access="public" location="testcpp.h" documented="true" meta="plain" virtual="virtual" const="false" static="false" final="false" override="true" type="void" signature="void virtualFun() override"/> - <alias name="DerivedType" fullname="TestQDoc::TestDerived::DerivedType" href="testqdoc-testderived.html#DerivedType-alias" status="active" access="public" location="testcpp.h" documented="true" aliasedtype="Test::SomeType"/> - <alias name="NotTypedef" fullname="TestQDoc::TestDerived::NotTypedef" href="testqdoc-testderived.html#NotTypedef-alias" status="active" access="public" location="testcpp.h" documented="true" aliasedtype="int"/> + <typedef name="DerivedType" fullname="TestQDoc::TestDerived::DerivedType" href="testqdoc-testderived.html#DerivedType-typedef" status="active" access="public" location="testcpp.h" documented="true" aliasedtype="Test::SomeType"/> + <typedef name="NotTypedef" fullname="TestQDoc::TestDerived::NotTypedef" href="testqdoc-testderived.html#NotTypedef-typedef" status="active" access="public" location="testcpp.h" documented="true" aliasedtype="int"/> </class> </namespace> <group name="testgroup" href="testgroup.html" status="internal" seen="false" title="" members="Test,QDOCTEST_MACRO2,someFunctionDefaultArg"/> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test-members.html b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test-members.html index faf340ed3..df0da4386 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test-members.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test-members.html @@ -11,7 +11,7 @@ <h1 class="title">List of All Members for Test</h1> <p>This is the complete list of members for <a href="testqdoc-test.html">TestQDoc::Test</a>, including inherited members.</p> <ul> -<li class="fn">typedef <span class="name"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></span></li> +<li class="fn"><span class="name"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></span></li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#Test">Test</a></b></span>()</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b></span>(TestQDoc::Test &&) : TestQDoc::Test &</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#funcPtr">funcPtr</a></b></span>(bool, const char *) : void (*)(bool)</li> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test.html b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test.html index fb2226e51..8ff9001b5 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test.html @@ -36,7 +36,7 @@ target_link_libraries(mytarget PUBLIC Qt::QDocTest)</td></tr><tr><td class="memI <a name="public-types"></a> <h2 id="public-types">Public Types</h2> <div class="table"><table class="alignedsummary"> -<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></td></tr> +<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></td></tr> </table></div> <a name="public-functions"></a> <h2 id="public-functions">Public Functions</h2> @@ -74,7 +74,7 @@ target_link_libraries(mytarget PUBLIC Qt::QDocTest)</td></tr><tr><td class="memI <div class="types"> <h2>Member Type Documentation</h2> <!-- $$$SomeType --> -<h3 class="fn" id="SomeType-typedef"><a name="SomeType-typedef"></a>typedef Test::<span class="name">SomeType</span></h3> +<h3 class="fn" id="SomeType-typedef"><a name="SomeType-typedef"></a>Test::<span class="name">SomeType</span></h3> <p>A typedef.</p> <!-- @@@SomeType --> </div> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-testderived-members.html b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-testderived-members.html index fe192a807..f8f9cd8f7 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-testderived-members.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-testderived-members.html @@ -11,9 +11,9 @@ <h1 class="title">List of All Members for TestDerived</h1> <p>This is the complete list of members for <a href="testqdoc-testderived.html">TestQDoc::TestDerived</a>, including inherited members.</p> <ul> -<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#DerivedType-alias">DerivedType</a></b></span></li> -<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#NotTypedef-alias">NotTypedef</a></b></span></li> -<li class="fn">typedef <span class="name"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></span></li> +<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#DerivedType-typedef">DerivedType</a></b></span></li> +<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#NotTypedef-typedef">NotTypedef</a></b></span></li> +<li class="fn"><span class="name"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></span></li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b></span>(TestQDoc::Test &&) : TestQDoc::Test &</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#funcPtr">funcPtr</a></b></span>(bool, const char *) : void (*)(bool)</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#inlineFunction">inlineFunction</a></b></span>()</li> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-testderived.html b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-testderived.html index 1be46f741..f820ce49f 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-testderived.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-testderived.html @@ -31,8 +31,8 @@ target_link_libraries(mytarget PUBLIC Qt::QDocTest)</td></tr><tr><td class="memI <a name="public-types"></a> <h2 id="public-types">Public Types</h2> <div class="table"><table class="alignedsummary"> -<tr><td class="memItemLeft rightAlign topAlign"> (alias) </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-testderived.html#DerivedType-alias">DerivedType</a></b></td></tr> -<tr><td class="memItemLeft rightAlign topAlign"> (alias) </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-testderived.html#NotTypedef-alias">NotTypedef</a></b></td></tr> +<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-testderived.html#DerivedType-typedef">DerivedType</a></b></td></tr> +<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-testderived.html#NotTypedef-typedef">NotTypedef</a></b></td></tr> </table></div> <a name="reimplemented-public-functions"></a> <h2 id="reimplemented-public-functions">Reimplemented Public Functions</h2> @@ -48,13 +48,11 @@ target_link_libraries(mytarget PUBLIC Qt::QDocTest)</td></tr><tr><td class="memI <div class="types"> <h2>Member Type Documentation</h2> <!-- $$$DerivedType --> -<h3 class="fn" id="DerivedType-alias"><a name="DerivedType-alias"></a><code>[alias] </code>TestDerived::<span class="name">DerivedType</span></h3> -<p>This is a type alias for <a href="testqdoc-test.html#SomeType-typedef">TestQDoc::Test::SomeType</a>.</p> +<h3 class="fn" id="DerivedType-typedef"><a name="DerivedType-typedef"></a><code>[alias] </code>TestDerived::<span class="name">DerivedType</span></h3> <p>An aliased typedef.</p> <!-- @@@DerivedType --> <!-- $$$NotTypedef --> -<h3 class="fn" id="NotTypedef-alias"><a name="NotTypedef-alias"></a><code>[alias] </code>TestDerived::<span class="name">NotTypedef</span></h3> -<p>This is a type alias for int.</p> +<h3 class="fn" id="NotTypedef-typedef"><a name="NotTypedef-typedef"></a><code>[alias] </code>TestDerived::<span class="name">NotTypedef</span></h3> <p>I'm an alias, not a typedef.</p> <!-- @@@NotTypedef --> </div> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/testtagfile.tags b/tests/auto/qdoc/generatedoutput/expected_output/testtagfile.tags index 16fbcdd98..de151f1b3 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/testtagfile.tags +++ b/tests/auto/qdoc/generatedoutput/expected_output/testtagfile.tags @@ -215,13 +215,13 @@ <member kind="typedef" type=""> <name>DerivedType</name> <anchorfile>testqdoc-testderived.html</anchorfile> - <anchor>DerivedType-alias</anchor> + <anchor>DerivedType-typedef</anchor> <arglist></arglist> </member> <member kind="typedef" type=""> <name>NotTypedef</name> <anchorfile>testqdoc-testderived.html</anchorfile> - <anchor>NotTypedef-alias</anchor> + <anchor>NotTypedef-typedef</anchor> <arglist></arglist> </member> <member kind="function" protection="public" virtualness="virtual" static="no"> |