summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/generator.cpp
diff options
context:
space:
mode:
authorMartin Smith <[email protected]>2014-03-20 13:51:35 +0100
committerThe Qt Project <[email protected]>2014-03-31 21:05:30 +0200
commitd13d03f012b9c0516fa027f4e1ea18c12f1491ca (patch)
tree420299ff025c475353da954b78961b53c7b9ccef /src/tools/qdoc/generator.cpp
parent2ea15849a09208ac19d189acdc51c313b64a0b3a (diff)
qdoc: Unexplained empty ref attributes in qhp files
This update fixes a bug introduced by the extensive changes for QTBUG-35377. Three node subtypes - Group, Module, and QML module, were promoted to be first line node types in the update for QTBUG-35377. This broke the file name construction routine for those node subtypes, which used to have the DocNode node type. This caused empty ref attributes to appear for those keyword elements in the qhp file. The file name construction routine has now been corrected to account for this. Task-number: QTBUG-37658 Change-Id: I307979255fdfd48493b3a4cebaf996b2130bc2c7 Reviewed-by: Martin Smith <[email protected]>
Diffstat (limited to 'src/tools/qdoc/generator.cpp')
-rw-r--r--src/tools/qdoc/generator.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp
index 92ae1bf4342..264e489942f 100644
--- a/src/tools/qdoc/generator.cpp
+++ b/src/tools/qdoc/generator.cpp
@@ -456,7 +456,7 @@ QString Generator::fullDocumentLocation(const Node *node, bool useSubdir)
if (!fdl.isEmpty())
fdl.append(QLatin1Char('/'));
}
- if (node->type() == Node::Namespace) {
+ if (node->isNamespace()) {
// The root namespace has no name - check for this before creating
// an attribute containing the location of any documentation.
@@ -466,9 +466,8 @@ QString Generator::fullDocumentLocation(const Node *node, bool useSubdir)
else
return QString();
}
- else if (node->type() == Node::Document) {
- if ((node->subType() == Node::QmlClass) ||
- (node->subType() == Node::QmlBasicType)) {
+ else if (node->isDocNode() || node->isCollectionNode()) {
+ if (node->isQmlType() || node->isQmlBasicType()) {
QString fb = fileBase(node);
if (fb.startsWith(Generator::outputPrefix(QLatin1String("QML"))))
return fb + QLatin1Char('.') + currentGenerator()->fileExtension();
@@ -563,6 +562,9 @@ QString Generator::fullDocumentLocation(const Node *node, bool useSubdir)
anchorRef = QLatin1Char('#') + node->name() + "-var";
break;
case Node::Document:
+ case Node::Group:
+ case Node::Module:
+ case Node::QmlModule:
{
parentName = fileBase(node);
parentName.replace(QLatin1Char('/'), QLatin1Char('-')).replace(QLatin1Char('.'), QLatin1Char('-'));