Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tools/qdoc3/tree.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    4444*/
    4545
    46 #include <QtCore>
    4746#include <QDomDocument>
    4847
     
    5453#include "text.h"
    5554#include "tree.h"
     55
     56
     57
    5658
    5759QT_BEGIN_NAMESPACE
     
    124126/*!
    125127 */
    126 Node *Tree::findNode(const QStringList &path, Node *relative, int findFlags)
     128Node *Tree::findNode(const QStringList &path, Node *relative, int findFlags)
    127129{
    128130    return const_cast<Node*>(const_cast<const Tree*>(this)->findNode(path,
    129131                                                                     relative,
    130                                                                      findFlags));
    131 }
    132 
    133 /*!
    134  */
    135 const Node *Tree::findNode(const QStringList &path,
    136                            const Node *relative,
    137                            int findFlags) const
    138 {
    139     if (!relative)
    140         relative = root();
     132                                                                     findFlags,
     133                                                                     self));
     134}
     135
     136/*!
     137 */
     138const Node* Tree::findNode(const QStringList &path,
     139                           const Node* start,
     140                           int findFlags,
     141                           const Node* self) const
     142{
     143    const Node* current = start;
     144    if (!current)
     145        current = root();
    141146
    142147    do {
    143         const Node *node = relative;
     148        const Node *node = ;
    144149        int i;
    145150
     
    150155            const Node *next =
    151156                static_cast<const InnerNode*>(node)->findNode(path.at(i));
     157
    152158            if (!next && (findFlags & SearchEnumValues) && i == path.size()-1)
    153159                next = static_cast<const InnerNode*>(node)->findEnumNodeForValue(path.at(i));
     
    168174        if (node && i == path.size()
    169175                && (!(findFlags & NonFunction) || node->type() != Node::Function
    170                     || ((FunctionNode *)node)->metaness() == FunctionNode::MacroWithoutParams))
    171             return node;
    172         relative = relative->parent();
    173     } while (relative);
     176                    || ((FunctionNode *)node)->metaness() == FunctionNode::MacroWithoutParams)) {
     177            if ((node != self) && (node->subType() != Node::QmlPropertyGroup)) {
     178                return node;
     179            }
     180        }
     181        current = current->parent();
     182    } while (current);
    174183
    175184    return 0;
     
    461470        NodeList::ConstIterator c = rootNode->childNodes().begin();
    462471        while (c != rootNode->childNodes().end()) {
    463             if ((*c)->type() == Node::Class)
     472            if ((*c)->type() == Node::Class)
    464473                resolveInheritance(pass, (ClassNode *) *c);
     474
    465475            else if ((*c)->type() == Node::Namespace) {
    466476                NamespaceNode *ns = static_cast<NamespaceNode*>(*c);
     
    534544            ClassNode *baseClass = (ClassNode*)findNode((*b).basePath,
    535545                                                        Node::Class);
    536             if (!baseClass && (*b).parent)
     546            if (!baseClass && (*b).parent)
    537547                baseClass = (ClassNode*)findNode((*b).basePath,
    538548                                                 Node::Class,
    539549                                                 (*b).parent);
    540             if (baseClass)
     550            }
     551            if (baseClass) {
    541552                classe->addBaseClass((*b).access,
    542553                                     baseClass,
    543554                                     (*b).dataTypeWithTemplateArgs);
     555
    544556            ++b;
    545557        }
     
    11191131            nodeName = "target";
    11201132            break;
     1133
     1134