From 45559920921336d27baf155dd67d747de3051cd6 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 26 Oct 2017 14:53:28 +0200 Subject: qdoc: Improve linking of QML types QML types and QML basic types were not autolinked correctly in many instances. - Provide correct context (genus) for code quote commands. This guarantees that the types resolve correctly for a \qml snippet even if there are colliding C++ target names. Note: we do not enforce 'CPP' genus for \code command, as it is commonly used also with QML code. - Similarly for examples, each .qml source file is set to have QML genus. - Remove QML basic types from the hard-coded map for known (C++) types/keywords. This prevented linking to these types. Task-number: QTBUG-62440 Change-Id: I578d8d4675e99cb4ba54171031efd8dc93040160 Reviewed-by: Martin Smith --- src/qdoc/cppcodeparser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/qdoc/cppcodeparser.cpp') diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp index 7298d1ec2..29e1c0fe6 100644 --- a/src/qdoc/cppcodeparser.cpp +++ b/src/qdoc/cppcodeparser.cpp @@ -2678,10 +2678,12 @@ void CppCodeParser::createExampleFileNodes(DocumentNode *dn) } foreach (const QString &exampleFile, exampleFiles) { - new DocumentNode(dn, + DocumentNode *fileNode = new DocumentNode(dn, exampleFile.mid(sizeOfBoringPartOfName), Node::File, Node::NoPageType); + if (fileNode->name().endsWith(".qml")) + fileNode->setGenus(Node::QML); } foreach (const QString &imageFile, imageFiles) { new DocumentNode(dn, -- cgit v1.2.1