diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-02-18 16:14:52 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-02-18 16:14:52 +0100 |
commit | f4900d340a4c620b56871995741696d28e53c167 (patch) | |
tree | 66d4ed6e4e8012e8a534717e87bf15cf8a992652 /src/tools/qdoc/qmlvisitor.cpp | |
parent | 7c33ae6a7bbbd42ce70acf77aa55c1bc2a23c8ec (diff) | |
parent | 843de37bca944110fdf3aab161d680e3845d2dd2 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
src/widgets/styles/qmacstyle_mac.mm
Change-Id: If8326db9e7da3cbf45dbf7475fdff9915c7723b1
Diffstat (limited to 'src/tools/qdoc/qmlvisitor.cpp')
-rw-r--r-- | src/tools/qdoc/qmlvisitor.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/tools/qdoc/qmlvisitor.cpp b/src/tools/qdoc/qmlvisitor.cpp index 9dc15d56f1..15af03d9ba 100644 --- a/src/tools/qdoc/qmlvisitor.cpp +++ b/src/tools/qdoc/qmlvisitor.cpp @@ -106,7 +106,7 @@ QmlDocVisitor::~QmlDocVisitor() } /*! - Returns the location of thre nearest comment above the \a offset. + Returns the location of the nearest comment above the \a offset. */ QQmlJS::AST::SourceLocation QmlDocVisitor::precedingComment(quint32 offset) const { @@ -322,11 +322,10 @@ void QmlDocVisitor::applyMetacommands(QQmlJS::AST::SourceLocation, else if (command == COMMAND_QMLINHERITS) { if (node->name() == args[0].first) doc.location().warning(tr("%1 tries to inherit itself").arg(args[0].first)); - else { - CodeParser::setLink(node, Node::InheritsLink, args[0].first); - if (node->subType() == Node::QmlClass) { - QmlClassNode::addInheritedBy(args[0].first,node); - } + else if (node->subType() == Node::QmlClass) { + QmlClassNode *qmlClass = static_cast<QmlClassNode*>(node); + qmlClass->setQmlBaseName(args[0].first); + QmlClassNode::addInheritedBy(args[0].first,node); } } else if (command == COMMAND_QMLDEFAULT) { @@ -389,11 +388,9 @@ bool QmlDocVisitor::visit(QQmlJS::AST::UiObjectDefinition *definition) QmlClassNode *component = new QmlClassNode(current, name); component->setTitle(name); component->setImportList(importList); - if (applyDocumentation(definition->firstSourceLocation(), component)) { QmlClassNode::addInheritedBy(type, component); - if (!component->links().contains(Node::InheritsLink)) - component->setLink(Node::InheritsLink, type, type); + component->setQmlBaseName(type); } current = component; } |