qdoc: Correct location info for typedefs with associated enums
For typedef nodes that have an associated enumeration, qdoc generates incorrect location info (written to index files) by simply appending '-typedef' to the node name. The correct location to link to is the associated enumeration, if one exists. Task-number: QTBUG-33684 Change-Id: I749171ccae9ccc10f084a40fda14e72d5f4d44cf Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>bb10
parent
61c49611fc
commit
cf5470e170
|
|
@ -531,8 +531,14 @@ QString Generator::fullDocumentLocation(const Node *node, bool useSubdir)
|
|||
anchorRef = QLatin1Char('#') + node->name() + "-enum";
|
||||
break;
|
||||
case Node::Typedef:
|
||||
{
|
||||
const TypedefNode *tdef = static_cast<const TypedefNode *>(node);
|
||||
if (tdef->associatedEnum()) {
|
||||
return fullDocumentLocation(tdef->associatedEnum());
|
||||
}
|
||||
anchorRef = QLatin1Char('#') + node->name() + "-typedef";
|
||||
break;
|
||||
}
|
||||
case Node::Property:
|
||||
anchorRef = QLatin1Char('#') + node->name() + "-prop";
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue