From e967772fe884dd8a488a359c122c9cbae9d94c55 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 21 Apr 2020 23:57:46 +0200 Subject: qdoc: properly implement \typealias command \typealias was already a command recognized by QDoc, but it was simply treated as a synonym for \typedef and was not documented. Implement proper support for the command: - Add [alias] designation both in type summary and details. - Auto-generate information about the aliased type, including a link if aliasing a public, documented type. - Auto-convert aliases documented with \typedef to type aliases. - Add basic support for aliases also to DocBook and WebXML generators. - Document \typealias. Fixes: QTBUG-82712 Change-Id: Iafa8c7def0a7488d7521fbc2862290a9bb3167ff Reviewed-by: Qt CI Bot Reviewed-by: Paul Wicking --- src/qdoc/node.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/qdoc/node.cpp') diff --git a/src/qdoc/node.cpp b/src/qdoc/node.cpp index 634cce3ec..cf8fa00f5 100644 --- a/src/qdoc/node.cpp +++ b/src/qdoc/node.cpp @@ -94,7 +94,7 @@ void Node::initialize() goals_.insert("example", Node::Example); goals_.insert("externalpage", Node::ExternalPage); goals_.insert("typedef", Node::Typedef); - goals_.insert("typealias", Node::Typedef); + goals_.insert("typealias", Node::TypeAlias); goals_.insert("function", Node::Function); goals_.insert("proxy", Node::Proxy); goals_.insert("property", Node::Property); @@ -938,6 +938,8 @@ QString Node::nodeTypeString(NodeType t) return QLatin1String("example"); case ExternalPage: return QLatin1String("external page"); + case TypeAlias: + return QLatin1String("alias"); case Typedef: return QLatin1String("typedef"); case Function: -- cgit v1.2.3