diff options
25 files changed, 277 insertions, 277 deletions
diff --git a/src/tools/qdoc/codemarker.cpp b/src/tools/qdoc/codemarker.cpp index 2253aca183..9889993fe2 100644 --- a/src/tools/qdoc/codemarker.cpp +++ b/src/tools/qdoc/codemarker.cpp @@ -390,7 +390,7 @@ void CodeMarker::insert(FastSection &fastSection, bool irrelevant = false; bool inheritedMember = false; if (!node->relates()) { - InnerNode* p = node->parent(); + Aggregate* p = node->parent(); if (p->isQmlPropertyGroup()) p = p->parent(); if (p != fastSection.parent_) { @@ -440,7 +440,7 @@ void CodeMarker::insert(FastSection &fastSection, if (node->parent()->isClass() || node->parent()->isNamespace()) { if (fastSection.inherited.isEmpty() || fastSection.inherited.last().first != node->parent()) { - QPair<InnerNode *, int> p(node->parent(), 0); + QPair<Aggregate *, int> p(node->parent(), 0); fastSection.inherited.append(p); } fastSection.inherited.last().second++; diff --git a/src/tools/qdoc/codemarker.h b/src/tools/qdoc/codemarker.h index 2dbbae3d5a..c5226fff04 100644 --- a/src/tools/qdoc/codemarker.h +++ b/src/tools/qdoc/codemarker.h @@ -64,7 +64,7 @@ struct Section QStringList keys; NodeList members; NodeList reimpMembers; - QList<QPair<InnerNode *, int> > inherited; + QList<QPair<Aggregate *, int> > inherited; ClassKeysNodesList classKeysNodesList_; Section() { } @@ -83,7 +83,7 @@ struct Section struct FastSection { - const InnerNode *parent_; + const Aggregate *parent_; QString name; QString divClass; QString singularMember; @@ -91,9 +91,9 @@ struct FastSection QMultiMap<QString, Node *> memberMap; QMultiMap<QString, Node *> reimpMemberMap; ClassMapList classMapList_; - QList<QPair<InnerNode *, int> > inherited; + QList<QPair<Aggregate *, int> > inherited; - FastSection(const InnerNode *parent, + FastSection(const Aggregate *parent, const QString& name0, const QString& divClass0, const QString& singularMember0, @@ -143,7 +143,7 @@ public: virtual QString markedUpIncludes(const QStringList& includes) = 0; virtual QString functionBeginRegExp(const QString& funcName) = 0; virtual QString functionEndRegExp(const QString& funcName) = 0; - virtual QList<Section> sections(const InnerNode *inner, + virtual QList<Section> sections(const Aggregate *inner, SynopsisStyle style, Status status) = 0; virtual QList<Section> qmlSections(QmlTypeNode* qmlTypeNode, diff --git a/src/tools/qdoc/cppcodemarker.cpp b/src/tools/qdoc/cppcodemarker.cpp index 3bba9cc66f..43ba29faa0 100644 --- a/src/tools/qdoc/cppcodemarker.cpp +++ b/src/tools/qdoc/cppcodemarker.cpp @@ -436,7 +436,7 @@ QString CppCodeMarker::functionEndRegExp(const QString& /* funcName */) return "^\\}$"; } -QList<Section> CppCodeMarker::sections(const InnerNode *inner, +QList<Section> CppCodeMarker::sections(const Aggregate *inner, SynopsisStyle style, Status status) { @@ -522,10 +522,10 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner, ++r; } - QStack<const InnerNode *> stack; + QStack<const Aggregate *> stack; stack.push(inner); while (!stack.isEmpty()) { - const InnerNode* ancestor = stack.pop(); + const Aggregate* ancestor = stack.pop(); NodeList::ConstIterator c = ancestor->childNodes().constBegin(); while (c != ancestor->childNodes().constEnd()) { @@ -701,11 +701,11 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner, else { FastSection all(inner,QString(),QString(),"member","members"); - QStack<const InnerNode*> stack; + QStack<const Aggregate*> stack; stack.push(inner); while (!stack.isEmpty()) { - const InnerNode* ancestor = stack.pop(); + const Aggregate* ancestor = stack.pop(); NodeList::ConstIterator c = ancestor->childNodes().constBegin(); while (c != ancestor->childNodes().constEnd()) { if ((*c)->access() != Node::Private && (*c)->type() != Node::Property) @@ -812,8 +812,8 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner, if (!ns->orphans().isEmpty()) { foreach (Node* n, ns->orphans()) { // Use inner as a temporary parent when inserting orphans - InnerNode* p = n->parent(); - n->setParent(const_cast<InnerNode*>(inner)); + Aggregate* p = n->parent(); + n->setParent(const_cast<Aggregate*>(inner)); if (n->isClass()) insert(classes, n, style, status); else if (n->isNamespace()) diff --git a/src/tools/qdoc/cppcodemarker.h b/src/tools/qdoc/cppcodemarker.h index 4535a091be..aa759f2993 100644 --- a/src/tools/qdoc/cppcodemarker.h +++ b/src/tools/qdoc/cppcodemarker.h @@ -67,7 +67,7 @@ public: virtual QString markedUpIncludes(const QStringList& includes) Q_DECL_OVERRIDE; virtual QString functionBeginRegExp(const QString& funcName) Q_DECL_OVERRIDE; virtual QString functionEndRegExp(const QString& funcName) Q_DECL_OVERRIDE; - virtual QList<Section> sections(const InnerNode *innerNode, + virtual QList<Section> sections(const Aggregate *innerNode, SynopsisStyle style, Status status) Q_DECL_OVERRIDE; virtual QList<Section> qmlSections(QmlTypeNode* qmlTypeNode, diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp index af56f1fcb8..a2c7a91827 100644 --- a/src/tools/qdoc/cppcodeparser.cpp +++ b/src/tools/qdoc/cppcodeparser.cpp @@ -422,7 +422,7 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc, lastPath_ = path; } - else if (node->isInnerNode()) { + else if (node->isAggregate()) { if (type == Node::Namespace) { NamespaceNode* ns = static_cast<NamespaceNode*>(node); ns->markSeen(); @@ -887,8 +887,8 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc, { QString arg = argLocPair.first; if (command == COMMAND_INHEADERFILE) { - if (node != 0 && node->isInnerNode()) { - ((InnerNode *) node)->addInclude(arg); + if (node != 0 && node->isAggregate()) { + ((Aggregate *) node)->addInclude(arg); } else { doc.location().warning(tr("Ignored '\\%1'") @@ -943,7 +943,7 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc, if (!n) doc.location().warning(tr("Cannot find '%1' in '\\%2'").arg(arg).arg(COMMAND_RELATES)); else - node->setRelates(static_cast<InnerNode*>(n)); + node->setRelates(static_cast<Aggregate*>(n)); } else if (command == COMMAND_CONTENTSPAGE) { setLink(node, Node::ContentsLink, arg); @@ -1348,7 +1348,7 @@ bool CppCodeParser::matchParameter(FunctionNode *func) return true; } -bool CppCodeParser::matchFunctionDecl(InnerNode *parent, +bool CppCodeParser::matchFunctionDecl(Aggregate *parent, QStringList *parentPathPtr, FunctionNode **funcPtr, const QString &templateStuff, @@ -1611,7 +1611,7 @@ bool CppCodeParser::matchBaseList(ClassNode *classe, bool isClass) sufficient for Qt because there are no cases of class nesting more than one level deep. */ -bool CppCodeParser::matchClassDecl(InnerNode *parent, +bool CppCodeParser::matchClassDecl(Aggregate *parent, const QString &templateStuff) { bool isClass = (tok == Tok_class); @@ -1626,7 +1626,7 @@ bool CppCodeParser::matchClassDecl(InnerNode *parent, if (tok == Tok_Gulbrandsen) { Node* n = parent->findChildNode(previousLexeme(),Node::Class); if (n) { - parent = static_cast<InnerNode*>(n); + parent = static_cast<Aggregate*>(n); if (parent) { readToken(); if (tok != Tok_Ident) @@ -1668,7 +1668,7 @@ bool CppCodeParser::matchClassDecl(InnerNode *parent, return matches; } -bool CppCodeParser::matchNamespaceDecl(InnerNode *parent) +bool CppCodeParser::matchNamespaceDecl(Aggregate *parent) { readToken(); // skip 'namespace' if (tok != Tok_Ident) @@ -1707,7 +1707,7 @@ bool CppCodeParser::matchNamespaceDecl(InnerNode *parent) member function is added to \a parent as an unresolved \c using clause. */ -bool CppCodeParser::matchUsingDecl(InnerNode* parent) +bool CppCodeParser::matchUsingDecl(Aggregate* parent) { bool usingNamespace = false; readToken(); // skip 'using' @@ -1769,7 +1769,7 @@ bool CppCodeParser::matchUsingDecl(InnerNode* parent) return true; } -bool CppCodeParser::matchEnumItem(InnerNode *parent, EnumNode *enume) +bool CppCodeParser::matchEnumItem(Aggregate *parent, EnumNode *enume) { if (!match(Tok_Ident)) return false; @@ -1820,7 +1820,7 @@ bool CppCodeParser::matchEnumItem(InnerNode *parent, EnumNode *enume) return true; } -bool CppCodeParser::matchEnumDecl(InnerNode *parent) +bool CppCodeParser::matchEnumDecl(Aggregate *parent) { QString name; @@ -1851,7 +1851,7 @@ bool CppCodeParser::matchEnumDecl(InnerNode *parent) return match(Tok_RightBrace) && match(Tok_Semicolon); } -bool CppCodeParser::matchTypedefDecl(InnerNode *parent) +bool CppCodeParser::matchTypedefDecl(Aggregate *parent) { CodeChunk dataType; QString name; @@ -1871,7 +1871,7 @@ bool CppCodeParser::matchTypedefDecl(InnerNode *parent) return true; } -bool CppCodeParser::matchProperty(InnerNode *parent) +bool CppCodeParser::matchProperty(Aggregate *parent) { int expected_tok = Tok_LeftParen; if (match(Tok_Q_PRIVATE_PROPERTY)) { @@ -1984,7 +1984,7 @@ bool CppCodeParser::matchProperty(InnerNode *parent) /*! Parse a C++ declaration. */ -bool CppCodeParser::matchDeclList(InnerNode *parent) +bool CppCodeParser::matchDeclList(Aggregate *parent) { ExtraFuncData extra; QString templateStuff; @@ -2251,15 +2251,15 @@ bool CppCodeParser::matchDocsAndStuff() processOtherMetaCommands(*d, *n); (*n)->setDoc(*d); checkModuleInclusion(*n); - if ((*n)->isInnerNode() && ((InnerNode *)*n)->includes().isEmpty()) { - InnerNode *m = static_cast<InnerNode *>(*n); + if ((*n)->isAggregate() && ((Aggregate *)*n)->includes().isEmpty()) { + Aggregate *m = static_cast<Aggregate *>(*n); while (m->parent() && m->physicalModuleName().isEmpty()) { m = m->parent(); } if (m == *n) - ((InnerNode *)*n)->addInclude((*n)->name()); + ((Aggregate *)*n)->addInclude((*n)->name()); else - ((InnerNode *)*n)->setIncludes(m->includes()); + ((Aggregate *)*n)->setIncludes(m->includes()); } ++d; ++n; @@ -2341,7 +2341,7 @@ bool CppCodeParser::makeFunctionNode(const QString& signature, */ FunctionNode* CppCodeParser::makeFunctionNode(const Doc& doc, const QString& sig, - InnerNode* parent, + Aggregate* parent, Node::NodeType type, bool attached, QString qdoctag) diff --git a/src/tools/qdoc/cppcodeparser.h b/src/tools/qdoc/cppcodeparser.h index 4f364c4feb..4acd370541 100644 --- a/src/tools/qdoc/cppcodeparser.h +++ b/src/tools/qdoc/cppcodeparser.h @@ -44,7 +44,7 @@ class ClassNode; class CodeChunk; class CppCodeParserPrivate; class FunctionNode; -class InnerNode; +class Aggregate; class Tokenizer; class CppCodeParser : public CodeParser @@ -52,12 +52,12 @@ class CppCodeParser : public CodeParser Q_DECLARE_TR_FUNCTIONS(QDoc::CppCodeParser) struct ExtraFuncData { - InnerNode* root; // Used as the parent. + Aggregate* root; // Used as the parent. Node::NodeType type; // The node type: Function, etc. bool isAttached; // If true, the method is attached. bool isMacro; // If true, we are parsing a macro signature. ExtraFuncData() : root(0), type(Node::Function), isAttached(false), isMacro(false) { } - ExtraFuncData(InnerNode* r, Node::NodeType t, bool a) + ExtraFuncData(Aggregate* r, Node::NodeType t, bool a) : root(r), type(t), isAttached(a), isMacro(false) { } }; @@ -117,22 +117,22 @@ protected: bool matchTemplateHeader(); bool matchDataType(CodeChunk *type, QString *var = 0); bool matchParameter(FunctionNode *func); - bool matchFunctionDecl(InnerNode *parent, + bool matchFunctionDecl(Aggregate *parent, QStringList *parentPathPtr, FunctionNode **funcPtr, const QString &templateStuff, ExtraFuncData& extra); bool matchBaseSpecifier(ClassNode *classe, bool isClass); bool matchBaseList(ClassNode *classe, bool isClass); - bool matchClassDecl(InnerNode *parent, + bool matchClassDecl(Aggregate *parent, const QString &templateStuff = QString()); - bool matchNamespaceDecl(InnerNode *parent); - bool matchUsingDecl(InnerNode* parent); - bool matchEnumItem(InnerNode *parent, EnumNode *enume); - bool matchEnumDecl(InnerNode *parent); - bool matchTypedefDecl(InnerNode *parent); - bool matchProperty(InnerNode *parent); - bool matchDeclList(InnerNode *parent); + bool matchNamespaceDecl(Aggregate *parent); + bool matchUsingDecl(Aggregate* parent); + bool matchEnumItem(Aggregate *parent, EnumNode *enume); + bool matchEnumDecl(Aggregate *parent); + bool matchTypedefDecl(Aggregate *parent); + bool matchProperty(Aggregate *parent); + bool matchDeclList(Aggregate *parent); bool matchDocsAndStuff(); bool makeFunctionNode(const QString &synopsis, QStringList *parentPathPtr, @@ -140,7 +140,7 @@ protected: ExtraFuncData& params); FunctionNode* makeFunctionNode(const Doc& doc, const QString& sig, - InnerNode* parent, + Aggregate* parent, Node::NodeType type, bool attached, QString qdoctag); diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp index 42870b3070..22f02327a9 100644 --- a/src/tools/qdoc/generator.cpp +++ b/src/tools/qdoc/generator.cpp @@ -259,7 +259,7 @@ void Generator::writeOutFileNames() Attaches a QTextStream to the created file, which is written to all over the place using out(). */ -void Generator::beginSubPage(const InnerNode* node, const QString& fileName) +void Generator::beginSubPage(const Aggregate* node, const QString& fileName) { QString path = outputDir() + QLatin1Char('/'); if (Generator::useOutputSubdirs() && !node->outputSubdirectory().isEmpty() && @@ -281,7 +281,7 @@ void Generator::beginSubPage(const InnerNode* node, const QString& fileName) out->setCodec(outputCodec); #endif outStreamStack.push(out); - const_cast<InnerNode*>(node)->setOutputFileName(fileName); + const_cast<Aggregate*>(node)->setOutputFileName(fileName); } /*! @@ -300,7 +300,7 @@ QString Generator::fileBase(const Node *node) const { if (node->relates()) node = node->relates(); - else if (!node->isInnerNode()) + else if (!node->isAggregate()) node = node->parent(); if (node->type() == Node::QmlPropertyGroup) { node = node->parent(); @@ -838,7 +838,7 @@ void Generator::generateBody(const Node *node, CodeMarker *marker) } } -void Generator::generateClassLikeNode(InnerNode* /* classe */, CodeMarker* /* marker */) +void Generator::generateClassLikeNode(Aggregate* /* classe */, CodeMarker* /* marker */) { } @@ -971,7 +971,7 @@ void Generator::generateInherits(const ClassNode *classe, CodeMarker *marker) /*! Recursive writing of HTML files from the root \a node. */ -void Generator::generateInnerNode(InnerNode* node) +void Generator::generateAggregate(Aggregate* node) { if (!node->url().isNull()) return; @@ -1056,8 +1056,8 @@ void Generator::generateInnerNode(InnerNode* node) int i = 0; while (i < node->childNodes().count()) { Node *c = node->childNodes().at(i); - if (c->isInnerNode() && c->access() != Node::Private) { - generateInnerNode((InnerNode*)c); + if (c->isAggregate() && c->access() != Node::Private) { + generateAggregate((Aggregate*)c); } ++i; } @@ -1066,7 +1066,7 @@ void Generator::generateInnerNode(InnerNode* node) /*! Generate a list of maintainers in the output */ -void Generator::generateMaintainerList(const InnerNode* node, CodeMarker* marker) +void Generator::generateMaintainerList(const Aggregate* node, CodeMarker* marker) { QStringList sl = getMetadataElements(node,"maintainer"); @@ -1205,19 +1205,19 @@ void Generator::generateStatus(const Node *node, CodeMarker *marker) break; case Node::Deprecated: text << Atom::ParaLeft; - if (node->isInnerNode()) + if (node->isAggregate()) text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD); text << "This " << typeString(node) << " is deprecated."; - if (node->isInnerNode()) + if (node->isAggregate()) text << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD); text << Atom::ParaRight; break; case Node::Obsolete: text << Atom::ParaLeft; - if (node->isInnerNode()) + if (node->isAggregate()) text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD); text << "This " << typeString(node) << " is obsolete."; - if (node->isInnerNode()) + if (node->isAggregate()) text << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD); text << " It is provided to keep old source code working. " << "We strongly advise against " @@ -1225,7 +1225,7 @@ void Generator::generateStatus(const Node *node, CodeMarker *marker) break; case Node::Compat: // reimplemented in HtmlGenerator subclass - if (node->isInnerNode()) { + if (node->isAggregate()) { text << Atom::ParaLeft << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD) << "This " @@ -1307,8 +1307,8 @@ void Generator::generateThreadSafeness(const Node *node, CodeMarker *marker) << Atom(Atom::FormattingRight,ATOM_FORMATTING_BOLD) << " "; - if (node->isInnerNode()) { - const InnerNode* innerNode = static_cast<const InnerNode*>(node); + if (node->isAggregate()) { + const Aggregate* innerNode = static_cast<const Aggregate*>(node); text << "All functions in this " << typeString(node) << " are "; @@ -1412,7 +1412,7 @@ void Generator::generateThreadSafeness(const Node *node, CodeMarker *marker) */ void Generator::generateDocs() { - generateInnerNode(qdb_->primaryTreeRoot()); + generateAggregate(qdb_->primaryTreeRoot()); } Generator *Generator::generatorForFormat(const QString& format) @@ -1435,7 +1435,7 @@ Generator *Generator::generatorForFormat(const QString& format) i.e. Once you call this function for a particular \a t, you consume \a t. */ -QString Generator::getMetadataElement(const InnerNode* inner, const QString& t) +QString Generator::getMetadataElement(const Aggregate* inner, const QString& t) { QString s; QStringMultiMap& metaTagMap = const_cast<QStringMultiMap&>(inner->doc().metaTagMap()); @@ -1456,7 +1456,7 @@ QString Generator::getMetadataElement(const InnerNode* inner, const QString& t) having the key \a t are erased. i.e. Once you call this function for a particular \a t, you consume \a t. */ -QStringList Generator::getMetadataElements(const InnerNode* inner, const QString& t) +QStringList Generator::getMetadataElements(const Aggregate* inner, const QString& t) { QStringList s; QStringMultiMap& metaTagMap = const_cast<QStringMultiMap&>(inner->doc().metaTagMap()); diff --git a/src/tools/qdoc/generator.h b/src/tools/qdoc/generator.h index b64cfc2824..ba4d5b0a45 100644 --- a/src/tools/qdoc/generator.h +++ b/src/tools/qdoc/generator.h @@ -105,7 +105,7 @@ public: static QmlTypeNode* qmlTypeContext() { return qmlTypeContext_; } protected: - virtual void beginSubPage(const InnerNode* node, const QString& fileName); + virtual void beginSubPage(const Aggregate* node, const QString& fileName); virtual void endSubPage(); virtual QString fileBase(const Node* node) const; virtual QString fileExtension() const = 0; @@ -113,15 +113,15 @@ protected: virtual void generateAlsoList(const Node *node, CodeMarker *marker); virtual int generateAtom(const Atom *atom, const Node *relative, CodeMarker *marker); virtual void generateBody(const Node *node, CodeMarker *marker); - virtual void generateClassLikeNode(InnerNode* inner, CodeMarker* marker); + virtual void generateClassLikeNode(Aggregate* inner, CodeMarker* marker); virtual void generateQmlTypePage(QmlTypeNode* , CodeMarker* ) { } virtual void generateQmlBasicTypePage(QmlBasicTypeNode* , CodeMarker* ) { } virtual void generateDocumentNode(DocumentNode* dn, CodeMarker* marker); virtual void generateCollectionNode(CollectionNode* cn, CodeMarker* marker); virtual void generateInheritedBy(const ClassNode *classe, CodeMarker *marker); virtual void generateInherits(const ClassNode *classe, CodeMarker *marker); - virtual void generateInnerNode(InnerNode* node); - virtual void generateMaintainerList(const InnerNode* node, CodeMarker* marker); + virtual void generateAggregate(Aggregate* node); + virtual void generateMaintainerList(const Aggregate* node, CodeMarker* marker); virtual void generateQmlInheritedBy(const QmlTypeNode* qcn, CodeMarker* marker); virtual void generateQmlInherits(QmlTypeNode* qcn, CodeMarker* marker); virtual bool generateQmlText(const Text& text, @@ -157,8 +157,8 @@ protected: void generateSince(const Node *node, CodeMarker *marker); void generateStatus(const Node *node, CodeMarker *marker); void generateThreadSafeness(const Node *node, CodeMarker *marker); - QString getMetadataElement(const InnerNode* inner, const QString& t); - QStringList getMetadataElements(const InnerNode* inner, const QString& t); + QString getMetadataElement(const Aggregate* inner, const QString& t); + QStringList getMetadataElements(const Aggregate* inner, const QString& t); QString indent(int level, const QString& markedCode); QTextStream& out(); QString outFileName(); diff --git a/src/tools/qdoc/helpprojectwriter.cpp b/src/tools/qdoc/helpprojectwriter.cpp index 2a9b243d70..e98b2f5cb1 100644 --- a/src/tools/qdoc/helpprojectwriter.cpp +++ b/src/tools/qdoc/helpprojectwriter.cpp @@ -472,8 +472,8 @@ void HelpProjectWriter::generateSections(HelpProject &project, if (!generateSection(project, writer, node)) return; - if (node->isInnerNode()) { - const InnerNode *inner = static_cast<const InnerNode *>(node); + if (node->isAggregate()) { + const Aggregate *inner = static_cast<const Aggregate *>(node); // Ensure that we don't visit nodes more than once. QMap<QString, const Node*> childMap; @@ -497,7 +497,7 @@ void HelpProjectWriter::generateSections(HelpProject &project, because The Qml/Js Property Group is an actual documented thing. */ - const InnerNode* inner = static_cast<const InnerNode*>(childNode); + const Aggregate* inner = static_cast<const Aggregate*>(childNode); foreach (const Node* n, inner->childNodes()) { if (n->access() == Node::Private) continue; diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index 8c8e56ba97..6985d3afee 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -1336,7 +1336,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark /*! Generate a reference page for a C++ class or a C++ namespace. */ -void HtmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker) +void HtmlGenerator::generateClassLikeNode(Aggregate* inner, CodeMarker* marker) { QList<Section> sections; QList<Section>::ConstIterator s; @@ -2086,7 +2086,7 @@ void HtmlGenerator::generateFooter(const Node *node) Lists the required imports and includes in a table. The number of rows is known, so this path is simpler than the generateSection() path. */ -void HtmlGenerator::generateRequisites(InnerNode *inner, CodeMarker *marker) +void HtmlGenerator::generateRequisites(Aggregate *inner, CodeMarker *marker) { QMap<QString, Text> requisites; Text text; @@ -2358,7 +2358,7 @@ void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker, } } -void HtmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *marker) +void HtmlGenerator::generateIncludes(const Aggregate *inner, CodeMarker *marker) { if (!inner->includes().isEmpty()) { out() << "<pre class=\"cpp\">" @@ -2517,7 +2517,7 @@ void HtmlGenerator::generateSidebar() { out() << "</div>\n"; } -QString HtmlGenerator::generateListOfAllMemberFile(const InnerNode *inner, +QString HtmlGenerator::generateListOfAllMemberFile(const Aggregate *inner, CodeMarker *marker) { QList<Section> sections; @@ -2612,7 +2612,7 @@ QString HtmlGenerator::generateAllQmlMembersFile(QmlTypeNode* qml_cn, CodeMarker return fileName; } -QString HtmlGenerator::generateLowStatusMemberFile(InnerNode *inner, +QString HtmlGenerator::generateLowStatusMemberFile(Aggregate *inner, CodeMarker *marker, CodeMarker::Status status) { @@ -3332,7 +3332,7 @@ void HtmlGenerator::generateSectionList(const Section& section, void HtmlGenerator::generateSectionInheritedList(const Section& section, const Node *relative) { - QList<QPair<InnerNode *, int> >::ConstIterator p = section.inherited.constBegin(); + QList<QPair<Aggregate *, int> >::ConstIterator p = section.inherited.constBegin(); while (p != section.inherited.constEnd()) { out() << "<li class=\"fn\">"; out() << (*p).second << ' '; @@ -3726,7 +3726,7 @@ QString HtmlGenerator::fileBase(const Node *node) const result = Generator::fileBase(node); - if (!node->isInnerNode()) { + if (!node->isAggregate()) { switch (node->status()) { case Node::Compat: result += "-compat"; @@ -3912,7 +3912,7 @@ QString HtmlGenerator::linkForNode(const Node *node, const Node *relative) } QString link = fn; - if (!node->isInnerNode() || node->isQmlPropertyGroup() || node->isJsPropertyGroup()) { + if (!node->isAggregate() || node->isQmlPropertyGroup() || node->isJsPropertyGroup()) { QString ref = refForNode(node); if (relative && fn == fileName(relative) && ref == refForNode(relative)) return QString(); @@ -3963,7 +3963,7 @@ void HtmlGenerator::generateFullName(const Node *apparentNode, const Node *relat } void HtmlGenerator::generateDetailedMember(const Node *node, - const InnerNode *relative, + const Aggregate *relative, CodeMarker *marker) { const EnumNode *enume; @@ -4088,7 +4088,7 @@ void HtmlGenerator::generateStatus(const Node *node, CodeMarker *marker) switch (node->status()) { case Node::Obsolete: - if (node->isInnerNode()) + if (node->isAggregate()) Generator::generateStatus(node, marker); break; case Node::Compat: @@ -4201,7 +4201,7 @@ void HtmlGenerator::generateQmlSummary(const Section& section, on a QML element reference page. */ void HtmlGenerator::generateDetailedQmlMember(Node *node, - const InnerNode *relative, + const Aggregate *relative, CodeMarker *marker) { QmlPropertyNode* qpn = 0; @@ -4702,7 +4702,7 @@ void HtmlGenerator::readManifestMetaContent(const Config &config) subtype: QML class subtype: QML module */ -void HtmlGenerator::reportOrphans(const InnerNode* parent) +void HtmlGenerator::reportOrphans(const Aggregate* parent) { const NodeList& children = parent->childNodes(); if (children.size() == 0) @@ -4828,7 +4828,7 @@ QXmlStreamWriter& HtmlGenerator::xmlWriter() It also ensures that a GUID map is created for the output file. */ -void HtmlGenerator::beginDitamapPage(const InnerNode* node, const QString& fileName) +void HtmlGenerator::beginDitamapPage(const Aggregate* node, const QString& fileName) { Generator::beginSubPage(node,fileName); QXmlStreamWriter* writer = new QXmlStreamWriter(out().device()); diff --git a/src/tools/qdoc/htmlgenerator.h b/src/tools/qdoc/htmlgenerator.h index efd38ea104..fe710024e0 100644 --- a/src/tools/qdoc/htmlgenerator.h +++ b/src/tools/qdoc/htmlgenerator.h @@ -95,7 +95,7 @@ protected: virtual int generateAtom(const Atom *atom, const Node *relative, CodeMarker *marker) Q_DECL_OVERRIDE; - virtual void generateClassLikeNode(InnerNode* inner, CodeMarker* marker) Q_DECL_OVERRIDE; + virtual void generateClassLikeNode(Aggregate* inner, CodeMarker* marker) Q_DECL_OVERRIDE; virtual void generateQmlTypePage(QmlTypeNode* qcn, CodeMarker* marker) Q_DECL_OVERRIDE; virtual void generateQmlBasicTypePage(QmlBasicTypeNode* qbtn, CodeMarker* marker) Q_DECL_OVERRIDE; virtual void generateDocumentNode(DocumentNode* dn, CodeMarker* marker) Q_DECL_OVERRIDE; @@ -137,22 +137,22 @@ private: const Node *relative, CodeMarker *marker); void generateFooter(const Node *node = 0); - void generateRequisites(InnerNode *inner, + void generateRequisites(Aggregate *inner, CodeMarker *marker); void generateQmlRequisites(QmlTypeNode *qcn, CodeMarker *marker); void generateBrief(const Node *node, CodeMarker *marker, const Node *relative = 0); - void generateIncludes(const InnerNode *inner, CodeMarker *marker); + void generateIncludes(const Aggregate *inner, CodeMarker *marker); void generateTableOfContents(const Node *node, CodeMarker *marker, QList<Section>* sections = 0); void generateSidebar(); - QString generateListOfAllMemberFile(const InnerNode *inner, + QString generateListOfAllMemberFile(const Aggregate *inner, CodeMarker *marker); QString generateAllQmlMembersFile(QmlTypeNode* qml_cn, CodeMarker* marker); - QString generateLowStatusMemberFile(InnerNode *inner, + QString generateLowStatusMemberFile(Aggregate *inner, CodeMarker *marker, CodeMarker::Status status); QString generateQmlMemberFile(QmlTypeNode* qcn, @@ -181,7 +181,7 @@ private: CodeMarker *marker, bool summary); void generateDetailedQmlMember(Node *node, - const InnerNode *relative, + const Aggregate *relative, CodeMarker *marker); void generateQmlInherits(QmlTypeNode* qcn, CodeMarker* marker) Q_DECL_OVERRIDE; void generateQmlInstantiates(QmlTypeNode* qcn, CodeMarker* marker); @@ -205,7 +205,7 @@ private: void generateFullName(const Node *apparentNode, const Node *relative, const Node *actualNode = 0); void generateDetailedMember(const Node *node, - const InnerNode *relative, + const Aggregate *relative, CodeMarker *marker); void generateLink(const Atom *atom, CodeMarker *marker); void generateStatus(const Node *node, CodeMarker *marker); @@ -224,9 +224,9 @@ private: void beginLink(const QString &link, const Node *node, const Node *relative); void endLink(); void generateExtractionMark(const Node *node, ExtractionMarkType markType); - void reportOrphans(const InnerNode* parent); + void reportOrphans(const Aggregate* parent); - void beginDitamapPage(const InnerNode* node, const QString& fileName); + void beginDitamapPage(const Aggregate* node, const QString& fileName); void endDitamapPage(); void writeDitaMap(const DitaMapNode* node); void writeDitaRefs(const DitaRefList& ditarefs); diff --git a/src/tools/qdoc/node.cpp b/src/tools/qdoc/node.cpp index 99adf1b233..34e5a0aa4e 100644 --- a/src/tools/qdoc/node.cpp +++ b/src/tools/qdoc/node.cpp @@ -200,7 +200,7 @@ void Node::setDoc(const Doc& doc, bool replace) given \a parent and \a name. The new node is added to the parent's child list. */ -Node::Node(NodeType type, InnerNode *parent, const QString& name) +Node::Node(NodeType type, Aggregate *parent, const QString& name) : nodeType_((unsigned char) type), access_((unsigned char) Public), safeness_((unsigned char) UnspecifiedSafeness), @@ -460,7 +460,7 @@ bool Node::fromFlagValue(FlagValue fv, bool defaultValue) /*! Sets the pointer to the node that this node relates to. */ -void Node::setRelates(InnerNode *pseudoParent) +void Node::setRelates(Aggregate *pseudoParent) { if (relatesTo_) { relatesTo_->removeRelated(this); @@ -683,14 +683,14 @@ const Node* Node::root() const } /*! - \class InnerNode + \class Aggregate */ /*! The inner node destructor deletes the children and removes this node from its related nodes. */ -InnerNode::~InnerNode() +Aggregate::~Aggregate() { deleteChildren(); removeFromRelated(); @@ -706,7 +706,7 @@ InnerNode::~InnerNode() find all this node's children that have the given \a name, and return the one that satisfies the \a genus requirement. */ -Node *InnerNode::findChildNode(const QString& name, Node::Genus genus) const +Node *Aggregate::findChildNode(const QString& name, Node::Genus genus) const { if (genus == Node::DontCare) { Node *node = childMap.value(name); @@ -716,7 +716,7 @@ Node *InnerNode::findChildNode(const QString& name, Node::Genus genus) const for (int i=0; i<children_.size(); ++i) { Node* n = children_.at(i); if (n->isQmlPropertyGroup() || isJsPropertyGroup()) { - node = static_cast<InnerNode*>(n)->findChildNode(name, genus); + node = static_cast<Aggregate*>(n)->findChildNode(name, genus); if (node) return node; } @@ -740,7 +740,7 @@ Node *InnerNode::findChildNode(const QString& name, Node::Genus genus) const Find all the child nodes of this node that are named \a name and return them in \a nodes. */ -void InnerNode::findChildren(const QString& name, NodeList& nodes) const +void Aggregate::findChildren(const QString& name, NodeList& nodes) const { nodes = childMap.values(name); Node* n = primaryFunctionMap.value(name); @@ -773,7 +773,7 @@ void InnerNode::findChildren(const QString& name, NodeList& nodes) const with the specified \a name is found but it is not of the specified \a type, 0 is returned. */ -Node* InnerNode::findChildNode(const QString& name, NodeType type) +Node* Aggregate::findChildNode(const QString& name, NodeType type) { if (type == Function) return primaryFunctionMap.value(name); @@ -792,7 +792,7 @@ Node* InnerNode::findChildNode(const QString& name, NodeType type) Find a function node that is a child of this nose, such that the function node has the specified \a name. */ -FunctionNode *InnerNode::findFunctionNode(const QString& name) const +FunctionNode *Aggregate::findFunctionNode(const QString& name) const { return static_cast<FunctionNode *>(primaryFunctionMap.value(name)); } @@ -802,7 +802,7 @@ FunctionNode *InnerNode::findFunctionNode(const QString& name) const that the function has the same name and signature as the \a clone node. */ -FunctionNode *InnerNode::findFunctionNode(const FunctionNode *clone) const +FunctionNode *Aggregate::findFunctionNode(const FunctionNode *clone) const { QMap<QString,Node*>::ConstIterator c = primaryFunctionMap.constFind(clone->name()); if (c != primaryFunctionMap.constEnd()) { @@ -825,7 +825,7 @@ FunctionNode *InnerNode::findFunctionNode(const FunctionNode *clone) const /*! Returns the list of keys from the primary function map. */ -QStringList InnerNode::primaryKeys() +QStringList Aggregate::primaryKeys() { QStringList t; QMap<QString, Node*>::iterator i = primaryFunctionMap.begin(); @@ -839,7 +839,7 @@ QStringList InnerNode::primaryKeys() /*! Returns the list of keys from the secondary function map. */ -QStringList InnerNode::secondaryKeys() +QStringList Aggregate::secondaryKeys() { QStringList t; QMap<QString, NodeList>::iterator i = secondaryFunctionMap.begin(); @@ -852,7 +852,7 @@ QStringList InnerNode::secondaryKeys() /*! */ -void InnerNode::setOverload(FunctionNode *func, bool b) +void Aggregate::setOverload(FunctionNode *func, bool b) { Node *node = (Node *) func; Node *&primary = primaryFunctionMap[func->name()]; @@ -887,7 +887,7 @@ void InnerNode::setOverload(FunctionNode *func, bool b) Intermediate status, meaning that they should be ignored, but not their children. */ -void InnerNode::makeUndocumentedChildrenInternal() +void Aggregate::makeUndocumentedChildrenInternal() { foreach (Node *child, childNodes()) { if (child->doc().isEmpty() && child->status() != Node::Intermediate) { @@ -899,7 +899,7 @@ void InnerNode::makeUndocumentedChildrenInternal() /*! */ -void InnerNode::normalizeOverloads() +void Aggregate::normalizeOverloads() { QMap<QString, Node *>::Iterator p1 = primaryFunctionMap.begin(); while (p1 != primaryFunctionMap.end()) { @@ -949,15 +949,15 @@ void InnerNode::normalizeOverloads() NodeList::ConstIterator c = childNodes().constBegin(); while (c != childNodes().constEnd()) { - if ((*c)->isInnerNode()) - ((InnerNode *) *c)->normalizeOverloads(); + if ((*c)->isAggregate()) + ((Aggregate *) *c)->normalizeOverloads(); ++c; } } /*! */ -void InnerNode::removeFromRelated() +void Aggregate::removeFromRelated() { while (!related_.isEmpty()) { Node *p = static_cast<Node *>(related_.takeFirst()); @@ -969,13 +969,13 @@ void InnerNode::removeFromRelated() /*! Deletes all this node's children. */ -void InnerNode::deleteChildren() +void Aggregate::deleteChildren() { NodeList childrenCopy = children_; // `children_` will be changed in ~Node() qDeleteAll(childrenCopy); } -/*! \fn bool InnerNode::isInnerNode() const +/*! \fn bool Aggregate::isAggregate() const Returns \c true because this is an inner node. */ @@ -995,7 +995,7 @@ bool Node::isWrapper() const no enum type node is found that has \a enumValue as one of its values. */ -const EnumNode *InnerNode::findEnumNodeForValue(const QString &enumValue) const +const EnumNode *Aggregate::findEnumNodeForValue(const QString &enumValue) const { foreach (const Node *node, enumChildren_) { const EnumNode *en = static_cast<const EnumNode *>(node); @@ -1010,7 +1010,7 @@ const EnumNode *InnerNode::findEnumNodeForValue(const QString &enumValue) const in the list of overloaded functions for a class, such that all the functions have the same name as the \a func. */ -int InnerNode::overloadNumber(const FunctionNode *func) const +int Aggregate::overloadNumber(const FunctionNode *func) const { Node *node = const_cast<FunctionNode *>(func); if (primaryFunctionMap[func->name()] == node) { @@ -1025,7 +1025,7 @@ int InnerNode::overloadNumber(const FunctionNode *func) const Returns a node list containing all the member functions of some class such that the functions overload the name \a funcName. */ -NodeList InnerNode::overloads(const QString &funcName) const +NodeList Aggregate::overloads(const QString &funcName) const { NodeList result; Node *primary = primaryFunctionMap.value(funcName); @@ -1040,7 +1040,7 @@ NodeList InnerNode::overloads(const QString &funcName) const Construct an inner node (i.e., not a leaf node) of the given \a type and having the given \a parent and \a name. */ -InnerNode::InnerNode(NodeType type, InnerNode *parent, const QString& name) +Aggregate::Aggregate(NodeType type, Aggregate *parent, const QString& name) : Node(type, parent, name) { switch (type) { @@ -1057,7 +1057,7 @@ InnerNode::InnerNode(NodeType type, InnerNode *parent, const QString& name) /*! Appends an \a include file to the list of include files. */ -void InnerNode::addInclude(const QString& include) +void Aggregate::addInclude(const QString& include) { includes_.append(include); } @@ -1065,7 +1065,7 @@ void InnerNode::addInclude(const QString& include) /*! Sets the list of include files to \a includes. */ -void InnerNode::setIncludes(const QStringList& includes) +void Aggregate::setIncludes(const QStringList& includes) { includes_ = includes; } @@ -1073,7 +1073,7 @@ void InnerNode::setIncludes(const QStringList& includes) /*! f1 is always the clone */ -bool InnerNode::isSameSignature(const FunctionNode *f1, const FunctionNode *f2) +bool Aggregate::isSameSignature(const FunctionNode *f1, const FunctionNode *f2) { if (f1->parameters().count() != f2->parameters().count()) return false; @@ -1111,7 +1111,7 @@ bool InnerNode::isSameSignature(const FunctionNode *f1, const FunctionNode *f2) be necessary to update this node's internal collections and the child's parent pointer and output subdirectory. */ -void InnerNode::addChild(Node *child) +void Aggregate::addChild(Node *child) { children_.append(child); if ((child->type() == Function) || (child->type() == QmlMethod)) { @@ -1141,7 +1141,7 @@ void InnerNode::addChild(Node *child) again, because it is presumed to already be there. We just want to be able to find the child by its \a title. */ -void InnerNode::addChild(Node* child, const QString& title) +void Aggregate::addChild(Node* child, const QString& title) { childMap.insertMulti(title, child); } @@ -1152,7 +1152,7 @@ void InnerNode::addChild(Node* child, const QString& title) pointer is set to 0, but its output subdirectory is not changed. */ -void InnerNode::removeChild(Node *child) +void Aggregate::removeChild(Node *child) { children_.removeAll(child); enumChildren_.removeAll(child); @@ -1196,7 +1196,7 @@ void InnerNode::removeChild(Node *child) /*! Recursively sets the output subdirectory for children */ -void InnerNode::setOutputSubdirectory(const QString &t) +void Aggregate::setOutputSubdirectory(const QString &t) { Node::setOutputSubdirectory(t); for (int i = 0; i < childNodes().size(); ++i) @@ -1259,7 +1259,7 @@ QString Node::physicalModuleName() const /*! */ -void InnerNode::removeRelated(Node *pseudoChild) +void Aggregate::removeRelated(Node *pseudoChild) { related_.removeAll(pseudoChild); } @@ -1268,7 +1268,7 @@ void InnerNode::removeRelated(Node *pseudoChild) If this node has a child that is a QML property named \a n, return the pointer to that child. */ -QmlPropertyNode* InnerNode::hasQmlProperty(const QString& n) const +QmlPropertyNode* Aggregate::hasQmlProperty(const QString& n) const { foreach (Node* child, childNodes()) { if (child->type() == Node::QmlProperty) { @@ -1289,7 +1289,7 @@ QmlPropertyNode* InnerNode::hasQmlProperty(const QString& n) const whose type (attached or normal property) matches \a attached, return the pointer to that child. */ -QmlPropertyNode* InnerNode::hasQmlProperty(const QString& n, bool attached) const +QmlPropertyNode* Aggregate::hasQmlProperty(const QString& n, bool attached) const { foreach (Node* child, childNodes()) { if (child->type() == Node::QmlProperty) { @@ -1309,7 +1309,7 @@ QmlPropertyNode* InnerNode::hasQmlProperty(const QString& n, bool attached) cons \class LeafNode */ -/*! \fn bool LeafNode::isInnerNode() const +/*! \fn bool LeafNode::isAggregate() const Returns \c false because this is a LeafNode. */ @@ -1317,7 +1317,7 @@ QmlPropertyNode* InnerNode::hasQmlProperty(const QString& n, bool attached) cons Constructs a leaf node named \a name of the specified \a type. The new leaf node becomes a child of \a parent. */ -LeafNode::LeafNode(NodeType type, InnerNode *parent, const QString& name) +LeafNode::LeafNode(NodeType type, Aggregate *parent, const QString& name) : Node(type, parent, name) { switch (type) { @@ -1344,7 +1344,7 @@ LeafNode::LeafNode(NodeType type, InnerNode *parent, const QString& name) documentation case where a \e{qmlproperty} command is used to override the QML definition of a QML property. */ -LeafNode::LeafNode(InnerNode* parent, NodeType type, const QString& name) +LeafNode::LeafNode(Aggregate* parent, NodeType type, const QString& name) : Node(type, 0, name) { setParent(parent); @@ -1372,8 +1372,8 @@ LeafNode::LeafNode(InnerNode* parent, NodeType type, const QString& name) /*! Constructs a namespace node. */ -NamespaceNode::NamespaceNode(InnerNode *parent, const QString& name) - : InnerNode(Namespace, parent, name), seen_(false), tree_(0) +NamespaceNode::NamespaceNode(Aggregate *parent, const QString& name) + : Aggregate(Namespace, parent, name), seen_(false), tree_(0) { setGenus(Node::CPP); setPageType(ApiPage); @@ -1387,8 +1387,8 @@ NamespaceNode::NamespaceNode(InnerNode *parent, const QString& name) /*! Constructs a class node. A class node will generate an API page. */ -ClassNode::ClassNode(InnerNode *parent, const QString& name) - : InnerNode(Class, parent, name) +ClassNode::ClassNode(Aggregate *parent, const QString& name) + : Aggregate(Class, parent, name) { abstract_ = false; wrapper_ = false; @@ -1582,8 +1582,8 @@ QmlTypeNode* ClassNode::findQmlBaseNode() which specifies the type of DocumentNode. The page type for the page index is set here. */ -DocumentNode::DocumentNode(InnerNode* parent, const QString& name, DocSubtype subtype, Node::PageType ptype) - : InnerNode(Document, parent, name), nodeSubtype_(subtype) +DocumentNode::DocumentNode(Aggregate* parent, const QString& name, DocSubtype subtype, Node::PageType ptype) + : Aggregate(Document, parent, name), nodeSubtype_(subtype) { setGenus(Node::DOC); switch (subtype) { @@ -1667,7 +1667,7 @@ QString DocumentNode::subTitle() const The constructor for the node representing an enum type has a \a parent class and an enum type \a name. */ -EnumNode::EnumNode(InnerNode *parent, const QString& name) +EnumNode::EnumNode(Aggregate *parent, const QString& name) : LeafNode(Enum, parent, name), flagsType_(0) { setGenus(Node::CPP); @@ -1712,7 +1712,7 @@ QString EnumNode::itemValue(const QString &name) const /*! */ -TypedefNode::TypedefNode(InnerNode *parent, const QString& name) +TypedefNode::TypedefNode(Aggregate *parent, const QString& name) : LeafNode(Typedef, parent, name), associatedEnum_(0) { setGenus(Node::CPP); @@ -1793,7 +1793,7 @@ QString Parameter::reconstruct(bool value) const Construct a function node for a C++ function. It's parent is \a parent, and it's name is \a name. */ -FunctionNode::FunctionNode(InnerNode *parent, const QString& name) +FunctionNode::FunctionNode(Aggregate *parent, const QString& name) : LeafNode(Function, parent, name), metaness_(Plain), virtualness_(NonVirtual), @@ -1813,7 +1813,7 @@ FunctionNode::FunctionNode(InnerNode *parent, const QString& name) by \a type. It's parent is \a parent, and it's name is \a name. If \a attached is true, it is an attached method or signal. */ -FunctionNode::FunctionNode(NodeType type, InnerNode *parent, const QString& name, bool attached) +FunctionNode::FunctionNode(NodeType type, Aggregate *parent, const QString& name, bool attached) : LeafNode(type, parent, name), metaness_(Plain), virtualness_(NonVirtual), @@ -2006,7 +2006,7 @@ void FunctionNode::debug() const The constructor sets the \a parent and the \a name, but everything else is set to default values. */ -PropertyNode::PropertyNode(InnerNode *parent, const QString& name) +PropertyNode::PropertyNode(Aggregate *parent, const QString& name) : LeafNode(Property, parent, name), stored_(FlagValueDefault), designable_(FlagValueDefault), @@ -2079,8 +2079,8 @@ QMultiMap<QString,Node*> QmlTypeNode::inheritedBy; Constructs a Qml class node. The new node has the given \a parent and \a name. */ -QmlTypeNode::QmlTypeNode(InnerNode *parent, const QString& name) - : InnerNode(QmlType, parent, name), +QmlTypeNode::QmlTypeNode(Aggregate *parent, const QString& name) + : Aggregate(QmlType, parent, name), abstract_(false), cnodeRequired_(false), wrapper_(false), @@ -2194,9 +2194,9 @@ QString QmlTypeNode::logicalModuleIdentifier() const Constructs a Qml basic type node. The new node has the given \a parent and \a name. */ -QmlBasicTypeNode::QmlBasicTypeNode(InnerNode *parent, +QmlBasicTypeNode::QmlBasicTypeNode(Aggregate *parent, const QString& name) - : InnerNode(QmlBasicType, parent, name) + : Aggregate(QmlBasicType, parent, name) { setTitle(name); setGenus(Node::QML); @@ -2207,7 +2207,7 @@ QmlBasicTypeNode::QmlBasicTypeNode(InnerNode *parent, always a QmlTypeNode. */ QmlPropertyGroupNode::QmlPropertyGroupNode(QmlTypeNode* parent, const QString& name) - : InnerNode(QmlPropertyGroup, parent, name) + : Aggregate(QmlPropertyGroup, parent, name) { idNumber_ = -1; setGenus(Node::QML); @@ -2230,7 +2230,7 @@ QString QmlPropertyGroupNode::idNumber() /*! Constructor for the QML property node. */ -QmlPropertyNode::QmlPropertyNode(InnerNode* parent, +QmlPropertyNode::QmlPropertyNode(Aggregate* parent, const QString& name, const QString& type, bool attached) @@ -2704,7 +2704,7 @@ QString Node::idForNode() const Prints the inner node's list of children. For debugging only. */ -void InnerNode::printChildren(const QString& title) +void Aggregate::printChildren(const QString& title) { qDebug() << title << name() << children_.size(); if (children_.size() > 0) { diff --git a/src/tools/qdoc/node.h b/src/tools/qdoc/node.h index f8f21f44db..8dcfa1f7be 100644 --- a/src/tools/qdoc/node.h +++ b/src/tools/qdoc/node.h @@ -48,7 +48,7 @@ class Node; class Tree; class EnumNode; class ClassNode; -class InnerNode; +class Aggregate; class ExampleNode; class TypedefNode; class QmlTypeNode; @@ -176,14 +176,14 @@ public: } void setThreadSafeness(ThreadSafeness t) { safeness_ = (unsigned char) t; } void setSince(const QString &since); - void setRelates(InnerNode* pseudoParent); + void setRelates(Aggregate* pseudoParent); void setPhysicalModuleName(const QString &name) { physicalModuleName_ = name; } void setUrl(const QString& url) { url_ = url; } void setTemplateStuff(const QString &t) { templateStuff_ = t; } void setReconstitutedBrief(const QString &t) { reconstitutedBrief_ = t; } void setPageType(PageType t) { pageType_ = (unsigned char) t; } void setPageType(const QString& t); - void setParent(InnerNode* n) { parent_ = n; } + void setParent(Aggregate* n) { parent_ = n; } void setIndexNodeFlag() { indexNodeFlag_ = true; } virtual void setOutputFileName(const QString& ) { } @@ -191,7 +191,7 @@ public: bool isJsNode() const { return genus() == JS; } bool isCppNode() const { return genus() == CPP; } - virtual bool isInnerNode() const = 0; + virtual bool isAggregate() const = 0; virtual bool isCollectionNode() const { return false; } virtual bool isDocumentNode() const { return false; } virtual bool isGroup() const { return false; } @@ -257,9 +257,9 @@ public: NodeType type() const { return (NodeType) nodeType_; } virtual DocSubtype docSubtype() const { return NoSubtype; } bool match(const NodeTypeList& types) const; - InnerNode* parent() const { return parent_; } + Aggregate* parent() const { return parent_; } const Node* root() const; - InnerNode* relates() const { return relatesTo_; } + Aggregate* relates() const { return relatesTo_; } const QString& name() const { return name_; } QString physicalModuleName() const; QString url() const { return url_; } @@ -330,7 +330,7 @@ public: static NodeType goal(const QString& t) { return goals_.value(t); } protected: - Node(NodeType type, InnerNode* parent, const QString& name); + Node(NodeType type, Aggregate* parent, const QString& name); private: @@ -342,8 +342,8 @@ private: unsigned char status_; bool indexNodeFlag_; - InnerNode* parent_; - InnerNode* relatesTo_; + Aggregate* parent_; + Aggregate* relatesTo_; QString name_; Location loc_; Doc doc_; @@ -361,10 +361,10 @@ private: static QMap<QString,Node::NodeType> goals_; }; -class InnerNode : public Node +class Aggregate : public Node { public: - virtual ~InnerNode(); + virtual ~Aggregate(); Node* findChildNode(const QString& name, Node::Genus genus) const; Node* findChildNode(const QString& name, NodeType type); @@ -379,7 +379,7 @@ public: void deleteChildren(); void removeFromRelated(); - virtual bool isInnerNode() const Q_DECL_OVERRIDE { return true; } + virtual bool isAggregate() const Q_DECL_OVERRIDE { return true; } virtual bool isLeaf() const Q_DECL_OVERRIDE { return false; } const EnumNode* findEnumNodeForValue(const QString &enumValue) const; const NodeList & childNodes() const { return children_; } @@ -407,7 +407,7 @@ public: virtual void setOutputSubdirectory(const QString& t); protected: - InnerNode(NodeType type, InnerNode* parent, const QString& name); + Aggregate(NodeType type, Aggregate* parent, const QString& name); private: friend class Node; @@ -433,18 +433,18 @@ public: LeafNode(); virtual ~LeafNode() { } - virtual bool isInnerNode() const Q_DECL_OVERRIDE { return false; } + virtual bool isAggregate() const Q_DECL_OVERRIDE { return false; } virtual bool isLeaf() const Q_DECL_OVERRIDE { return true; } protected: - LeafNode(NodeType type, InnerNode* parent, const QString& name); - LeafNode(InnerNode* parent, NodeType type, const QString& name); + LeafNode(NodeType type, Aggregate* parent, const QString& name); + LeafNode(Aggregate* parent, NodeType type, const QString& name); }; -class NamespaceNode : public InnerNode +class NamespaceNode : public Aggregate { public: - NamespaceNode(InnerNode* parent, const QString& name); + NamespaceNode(Aggregate* parent, const QString& name); virtual ~NamespaceNode() { } virtual bool isNamespace() const Q_DECL_OVERRIDE { return true; } virtual Tree* tree() const Q_DECL_OVERRIDE { return (parent() ? parent()->tree() : tree_); } @@ -492,10 +492,10 @@ struct UsingClause QString signature_; }; -class ClassNode : public InnerNode +class ClassNode : public Aggregate { public: - ClassNode(InnerNode* parent, const QString& name); + ClassNode(Aggregate* parent, const QString& name); virtual ~ClassNode() { } virtual bool isClass() const Q_DECL_OVERRIDE { return true; } virtual bool isWrapper() const Q_DECL_OVERRIDE { return wrapper_; } @@ -538,11 +538,11 @@ private: QmlTypeNode* qmlelement; }; -class DocumentNode : public InnerNode +class DocumentNode : public Aggregate { public: - DocumentNode(InnerNode* parent, + DocumentNode(Aggregate* parent, const QString& name, DocSubtype docSubtype, PageType ptype); @@ -574,7 +574,7 @@ protected: class ExampleNode : public DocumentNode { public: - ExampleNode(InnerNode* parent, const QString& name) + ExampleNode(Aggregate* parent, const QString& name) : DocumentNode(parent, name, Node::Example, Node::ExamplePage) { } virtual ~ExampleNode() { } virtual QString imageFileName() const Q_DECL_OVERRIDE { return imageFileName_; } @@ -604,10 +604,10 @@ struct ImportRec { typedef QList<ImportRec> ImportList; -class QmlTypeNode : public InnerNode +class QmlTypeNode : public Aggregate { public: - QmlTypeNode(InnerNode* parent, const QString& name); + QmlTypeNode(Aggregate* parent, const QString& name); virtual ~QmlTypeNode(); virtual bool isQmlType() const Q_DECL_OVERRIDE { return genus() == Node::QML; } virtual bool isJsType() const Q_DECL_OVERRIDE { return genus() == Node::JS; } @@ -659,17 +659,17 @@ private: ImportList importList_; }; -class QmlBasicTypeNode : public InnerNode +class QmlBasicTypeNode : public Aggregate { public: - QmlBasicTypeNode(InnerNode* parent, + QmlBasicTypeNode(Aggregate* parent, const QString& name); virtual ~QmlBasicTypeNode() { } virtual bool isQmlBasicType() const Q_DECL_OVERRIDE { return (genus() == Node::QML); } virtual bool isJsBasicType() const Q_DECL_OVERRIDE { return (genus() == Node::JS); } }; -class QmlPropertyGroupNode : public InnerNode +class QmlPropertyGroupNode : public Aggregate { public: QmlPropertyGroupNode(QmlTypeNode* parent, const QString& name); @@ -699,7 +699,7 @@ class QmlPropertyNode : public LeafNode Q_DECLARE_TR_FUNCTIONS(QDoc::QmlPropertyNode) public: - QmlPropertyNode(InnerNode *parent, + QmlPropertyNode(Aggregate *parent, const QString& name, const QString& type, bool attached); @@ -767,7 +767,7 @@ private: class EnumNode : public LeafNode { public: - EnumNode(InnerNode* parent, const QString& name); + EnumNode(Aggregate* parent, const QString& name); virtual ~EnumNode() { } void addItem(const EnumItem& item); @@ -788,7 +788,7 @@ private: class TypedefNode : public LeafNode { public: - TypedefNode(InnerNode* parent, const QString& name); + TypedefNode(Aggregate* parent, const QString& name); virtual ~TypedefNode() { } const EnumNode* associatedEnum() const { return associatedEnum_; } @@ -851,8 +851,8 @@ public: Native }; enum Virtualness { NonVirtual, NormalVirtual, PureVirtual }; - FunctionNode(InnerNode* parent, const QString &name); - FunctionNode(NodeType type, InnerNode* parent, const QString &name, bool attached); + FunctionNode(Aggregate* parent, const QString &name); + FunctionNode(NodeType type, Aggregate* parent, const QString &name, bool attached); virtual ~FunctionNode() { } void setReturnType(const QString& t) { returnType_ = t; } @@ -928,7 +928,7 @@ public: private: void setAssociatedProperty(PropertyNode* property); - friend class InnerNode; + friend class Aggregate; friend class PropertyNode; QString returnType_; @@ -952,7 +952,7 @@ public: enum FunctionRole { Getter, Setter, Resetter, Notifier }; enum { NumFunctionRoles = Notifier + 1 }; - PropertyNode(InnerNode* parent, const QString& name); + PropertyNode(Aggregate* parent, const QString& name); virtual ~PropertyNode() { } virtual void setDataType(const QString& dataType) Q_DECL_OVERRIDE { type_ = dataType; } @@ -1040,7 +1040,7 @@ inline NodeList PropertyNode::functions() const class VariableNode : public LeafNode { public: - VariableNode(InnerNode* parent, const QString &name); + VariableNode(Aggregate* parent, const QString &name); virtual ~VariableNode() { } void setLeftType(const QString &leftType) { lrftType_ = leftType; } @@ -1058,7 +1058,7 @@ private: bool static_; }; -inline VariableNode::VariableNode(InnerNode* parent, const QString &name) +inline VariableNode::VariableNode(Aggregate* parent, const QString &name) : LeafNode(Variable, parent, name), static_(false) { setGenus(Node::CPP); @@ -1067,20 +1067,20 @@ inline VariableNode::VariableNode(InnerNode* parent, const QString &name) class DitaMapNode : public DocumentNode { public: - DitaMapNode(InnerNode* parent, const QString& name) + DitaMapNode(Aggregate* parent, const QString& name) : DocumentNode(parent, name, Node::Page, Node::DitaMapPage) { } virtual ~DitaMapNode() { } const DitaRefList& map() const { return doc().ditamap(); } }; -class CollectionNode : public InnerNode +class CollectionNode : public Aggregate { public: CollectionNode(NodeType type, - InnerNode* parent, + Aggregate* parent, const QString& name, - Genus genus) : InnerNode(type, parent, name), seen_(false) + Genus genus) : Aggregate(type, parent, name), seen_(false) { setPageType(Node::OverviewPage); setGenus(genus); diff --git a/src/tools/qdoc/plaincodemarker.cpp b/src/tools/qdoc/plaincodemarker.cpp index 09afb84ee6..bf2a55b2d5 100644 --- a/src/tools/qdoc/plaincodemarker.cpp +++ b/src/tools/qdoc/plaincodemarker.cpp @@ -109,7 +109,7 @@ QString PlainCodeMarker::functionEndRegExp( const QString& /* funcName */ ) return QString(); } -QList<Section> PlainCodeMarker::sections(const InnerNode * /* innerNode */, +QList<Section> PlainCodeMarker::sections(const Aggregate * /* innerNode */, SynopsisStyle /* style */, Status /* status */) { diff --git a/src/tools/qdoc/plaincodemarker.h b/src/tools/qdoc/plaincodemarker.h index fcaa926f8e..b83a3e4697 100644 --- a/src/tools/qdoc/plaincodemarker.h +++ b/src/tools/qdoc/plaincodemarker.h @@ -61,7 +61,7 @@ public: QString markedUpIncludes( const QStringList& includes ) Q_DECL_OVERRIDE; QString functionBeginRegExp( const QString& funcName ) Q_DECL_OVERRIDE; QString functionEndRegExp( const QString& funcName ) Q_DECL_OVERRIDE; - QList<Section> sections(const InnerNode *innerNode, SynopsisStyle style, Status status) Q_DECL_OVERRIDE; + QList<Section> sections(const Aggregate *innerNode, SynopsisStyle style, Status status) Q_DECL_OVERRIDE; }; QT_END_NAMESPACE diff --git a/src/tools/qdoc/puredocparser.cpp b/src/tools/qdoc/puredocparser.cpp index 7029431460..6b644cac31 100644 --- a/src/tools/qdoc/puredocparser.cpp +++ b/src/tools/qdoc/puredocparser.cpp @@ -207,14 +207,14 @@ bool PureDocParser::processQdocComments() processOtherMetaCommands(*d, *n); (*n)->setDoc(*d); checkModuleInclusion(*n); - if ((*n)->isInnerNode() && ((InnerNode *)*n)->includes().isEmpty()) { - InnerNode *m = static_cast<InnerNode *>(*n); + if ((*n)->isAggregate() && ((Aggregate *)*n)->includes().isEmpty()) { + Aggregate *m = static_cast<Aggregate *>(*n); while (m->parent() && m->parent() != treeRoot) m = m->parent(); if (m == *n) - ((InnerNode *)*n)->addInclude((*n)->name()); + ((Aggregate *)*n)->addInclude((*n)->name()); else - ((InnerNode *)*n)->setIncludes(m->includes()); + ((Aggregate *)*n)->setIncludes(m->includes()); } ++d; ++n; diff --git a/src/tools/qdoc/qdocdatabase.cpp b/src/tools/qdoc/qdocdatabase.cpp index e97145458f..fca34b0a6a 100644 --- a/src/tools/qdoc/qdocdatabase.cpp +++ b/src/tools/qdoc/qdocdatabase.cpp @@ -815,7 +815,7 @@ void QDocDatabase::processForest() mode, each tree is analyzed in turn, and its classes and types are added to the appropriate node maps. */ -void QDocDatabase::processForest(void (QDocDatabase::*func) (InnerNode*)) +void QDocDatabase::processForest(void (QDocDatabase::*func) (Aggregate*)) { Tree* t = forest_.firstTree(); while (t) { @@ -930,7 +930,7 @@ NodeMultiMap& QDocDatabase::getCppClasses() Finds all the C++ class nodes and QML type nodes and sorts them into maps. */ -void QDocDatabase::findAllClasses(InnerNode* node) +void QDocDatabase::findAllClasses(Aggregate* node) { NodeList::const_iterator c = node->childNodes().constBegin(); while (c != node->childNodes().constEnd()) { @@ -957,8 +957,8 @@ void QDocDatabase::findAllClasses(InnerNode* node) if ((*c)->isQmlBasicType() || (*c)->isJsType()) qmlBasicTypes_.insert(qmlTypeName,*c); } - else if ((*c)->isInnerNode()) { - findAllClasses(static_cast<InnerNode*>(*c)); + else if ((*c)->isAggregate()) { + findAllClasses(static_cast<Aggregate*>(*c)); } } ++c; @@ -978,13 +978,13 @@ NodeMapMap& QDocDatabase::getFunctionIndex() /*! Finds all the function nodes */ -void QDocDatabase::findAllFunctions(InnerNode* node) +void QDocDatabase::findAllFunctions(Aggregate* node) { NodeList::ConstIterator c = node->childNodes().constBegin(); while (c != node->childNodes().constEnd()) { if ((*c)->access() != Node::Private) { - if ((*c)->isInnerNode()) { - findAllFunctions(static_cast<InnerNode*>(*c)); + if ((*c)->isAggregate()) { + findAllFunctions(static_cast<Aggregate*>(*c)); } else if ((*c)->type() == Node::Function) { const FunctionNode* func = static_cast<const FunctionNode*>(*c); @@ -1004,15 +1004,15 @@ void QDocDatabase::findAllFunctions(InnerNode* node) Finds all the nodes containing legalese text and puts them in a map. */ -void QDocDatabase::findAllLegaleseTexts(InnerNode* node) +void QDocDatabase::findAllLegaleseTexts(Aggregate* node) { NodeList::ConstIterator c = node->childNodes().constBegin(); while (c != node->childNodes().constEnd()) { if ((*c)->access() != Node::Private) { if (!(*c)->doc().legaleseText().isEmpty()) legaleseTexts_.insertMulti((*c)->doc().legaleseText(), *c); - if ((*c)->isInnerNode()) - findAllLegaleseTexts(static_cast<InnerNode *>(*c)); + if ((*c)->isAggregate()) + findAllLegaleseTexts(static_cast<Aggregate *>(*c)); } ++c; } @@ -1021,13 +1021,13 @@ void QDocDatabase::findAllLegaleseTexts(InnerNode* node) /*! Finds all the namespace nodes and puts them in an index. */ -void QDocDatabase::findAllNamespaces(InnerNode* node) +void QDocDatabase::findAllNamespaces(Aggregate* node) { NodeList::ConstIterator c = node->childNodes().constBegin(); while (c != node->childNodes().constEnd()) { if ((*c)->access() != Node::Private || (*c)->isNamespace()) { - if ((*c)->isInnerNode()) { - findAllNamespaces(static_cast<InnerNode *>(*c)); + if ((*c)->isAggregate()) { + findAllNamespaces(static_cast<Aggregate *>(*c)); if ((*c)->isNamespace()) { // Ensure that the namespace's name is not empty (the root // namespace has no name). @@ -1046,7 +1046,7 @@ void QDocDatabase::findAllNamespaces(InnerNode* node) maps. They can be C++ classes, QML types, or they can be functions, enum types, typedefs, methods, etc. */ -void QDocDatabase::findAllObsoleteThings(InnerNode* node) +void QDocDatabase::findAllObsoleteThings(Aggregate* node) { NodeList::const_iterator c = node->childNodes().constBegin(); while (c != node->childNodes().constEnd()) { @@ -1067,7 +1067,7 @@ void QDocDatabase::findAllObsoleteThings(InnerNode* node) } } else if ((*c)->type() == Node::Class) { - InnerNode* n = static_cast<InnerNode*>(*c); + Aggregate* n = static_cast<Aggregate*>(*c); bool inserted = false; NodeList::const_iterator p = n->childNodes().constBegin(); while (p != n->childNodes().constEnd()) { @@ -1096,7 +1096,7 @@ void QDocDatabase::findAllObsoleteThings(InnerNode* node) } } else if ((*c)->isQmlType() || (*c)->isJsType()) { - InnerNode* n = static_cast<InnerNode*>(*c); + Aggregate* n = static_cast<Aggregate*>(*c); bool inserted = false; NodeList::const_iterator p = n->childNodes().constBegin(); while (p != n->childNodes().constEnd()) { @@ -1127,8 +1127,8 @@ void QDocDatabase::findAllObsoleteThings(InnerNode* node) ++p; } } - else if ((*c)->isInnerNode()) { - findAllObsoleteThings(static_cast<InnerNode*>(*c)); + else if ((*c)->isAggregate()) { + findAllObsoleteThings(static_cast<Aggregate*>(*c)); } } ++c; @@ -1143,7 +1143,7 @@ void QDocDatabase::findAllObsoleteThings(InnerNode* node) This function is used for generating the "New Classes... in x.y" section on the \e{What's New in Qt x.y} page. */ -void QDocDatabase::findAllSince(InnerNode* node) +void QDocDatabase::findAllSince(Aggregate* node) { NodeList::const_iterator child = node->childNodes().constBegin(); while (child != node->childNodes().constEnd()) { @@ -1206,8 +1206,8 @@ void QDocDatabase::findAllSince(InnerNode* node) } } // Recursively find child nodes with since commands. - if ((*child)->isInnerNode()) - findAllSince(static_cast<InnerNode *>(*child)); + if ((*child)->isAggregate()) + findAllSince(static_cast<Aggregate *>(*child)); ++child; } @@ -1394,7 +1394,7 @@ const Node* QDocDatabase::findNodeForTarget(const QString& target, const Node* r base type node. If the node is found in the tree, set the node's QML base type node pointer. */ -void QDocDatabase::resolveQmlInheritance(InnerNode* root) +void QDocDatabase::resolveQmlInheritance(Aggregate* root) { NodeMap previousSearches; // Do we need recursion? diff --git a/src/tools/qdoc/qdocdatabase.h b/src/tools/qdoc/qdocdatabase.h index 9d3b757eec..6154ec762b 100644 --- a/src/tools/qdoc/qdocdatabase.h +++ b/src/tools/qdoc/qdocdatabase.h @@ -130,9 +130,9 @@ class QDocForest return 0; } - InnerNode* findRelatesNode(const QStringList& path) { + Aggregate* findRelatesNode(const QStringList& path) { foreach (Tree* t, searchOrder()) { - InnerNode* n = t->findRelatesNode(path); + Aggregate* n = t->findRelatesNode(path); if (n) return n; } @@ -260,12 +260,12 @@ class QDocDatabase QmlTypeNode* findQmlType(const ImportRec& import, const QString& name); private: - void findAllClasses(InnerNode *node); - void findAllFunctions(InnerNode *node); - void findAllLegaleseTexts(InnerNode *node); - void findAllNamespaces(InnerNode *node); - void findAllObsoleteThings(InnerNode* node); - void findAllSince(InnerNode *node); + void findAllClasses(Aggregate *node); + void findAllFunctions(Aggregate *node); + void findAllLegaleseTexts(Aggregate *node); + void findAllNamespaces(Aggregate *node); + void findAllObsoleteThings(Aggregate* node); + void findAllSince(Aggregate *node); public: /******************************************************************* @@ -289,7 +289,7 @@ class QDocDatabase Many of these will be either eliminated or replaced. ********************************************************************/ void resolveInheritance() { primaryTree()->resolveInheritance(); } - void resolveQmlInheritance(InnerNode* root); + void resolveQmlInheritance(Aggregate* root); void resolveIssues(); void resolveStuff(); void fixInheritance() { primaryTree()->fixInheritance(); } @@ -327,7 +327,7 @@ class QDocDatabase ********************************************************************/ ClassNode* findClassNode(const QStringList& path) { return forest_.findClassNode(path); } Node* findNodeForInclude(const QStringList& path) { return forest_.findNodeForInclude(path); } - InnerNode* findRelatesNode(const QStringList& path) { return forest_.findRelatesNode(path); } + Aggregate* findRelatesNode(const QStringList& path) { return forest_.findRelatesNode(path); } const Node* findFunctionNode(const QString& target, const Node* relative, Node::Genus genus) { return forest_.findFunctionNode(target, relative, genus); } @@ -414,7 +414,7 @@ class QDocDatabase Node::Genus genus) { return forest_.findNode(path, relative, findFlags, genus); } - void processForest(void (QDocDatabase::*) (InnerNode*)); + void processForest(void (QDocDatabase::*) (Aggregate*)); bool isLoaded(const QString& t) { return forest_.isLoaded(t); } static void initializeDB(); diff --git a/src/tools/qdoc/qdocindexfiles.cpp b/src/tools/qdoc/qdocindexfiles.cpp index b921d0947d..dc6bb674f2 100644 --- a/src/tools/qdoc/qdocindexfiles.cpp +++ b/src/tools/qdoc/qdocindexfiles.cpp @@ -172,9 +172,9 @@ void QDocIndexFiles::readIndexSection(const QDomElement& element, QString href = element.attribute("href"); Node* node; Location location; - InnerNode* parent = 0; - if (current->isInnerNode()) - parent = static_cast<InnerNode*>(current); + Aggregate* parent = 0; + if (current->isAggregate()) + parent = static_cast<Aggregate*>(current); QString filePath; int lineNo = 0; @@ -937,7 +937,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer, else href = node->name(); if (node->isQmlNode() || node->isJsNode()) { - InnerNode* p = node->parent(); + Aggregate* p = node->parent(); if (p) { if (p->isQmlPropertyGroup() || p->isJsPropertyGroup()) p = p->parent(); @@ -1349,8 +1349,8 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer, // opening tag, create child elements, then add a closing tag for the // element. Elements for all other nodes are closed in the opening tag. - if (node->isInnerNode()) { - const InnerNode* inner = static_cast<const InnerNode*>(node); + if (node->isAggregate()) { + const Aggregate* inner = static_cast<const Aggregate*>(node); if (inner->doc().hasTableOfContents()) { for (int i = 0; i < inner->doc().tableOfContents().size(); ++i) { @@ -1453,8 +1453,8 @@ void QDocIndexFiles::generateIndexSections(QXmlStreamWriter& writer, return; if (generateIndexSection(writer, node, generateInternalNodes)) { - if (node->isInnerNode()) { - const InnerNode* inner = static_cast<const InnerNode*>(node); + if (node->isAggregate()) { + const Aggregate* inner = static_cast<const Aggregate*>(node); NodeList cnodes = inner->childNodes(); std::sort(cnodes.begin(), cnodes.end(), compareNodes); diff --git a/src/tools/qdoc/qdoctagfiles.cpp b/src/tools/qdoc/qdoctagfiles.cpp index a0eb46f312..7a1902bbca 100644 --- a/src/tools/qdoc/qdoctagfiles.cpp +++ b/src/tools/qdoc/qdoctagfiles.cpp @@ -100,7 +100,7 @@ void QDocTagFiles::destroyQDocTagFiles() specified, returning true if an element was written; otherwise returns false. */ -void QDocTagFiles::generateTagFileCompounds(QXmlStreamWriter& writer, const InnerNode* inner) +void QDocTagFiles::generateTagFileCompounds(QXmlStreamWriter& writer, const Aggregate* inner) { foreach (const Node* node, inner->childNodes()) { if (!node->url().isEmpty()) @@ -161,22 +161,22 @@ void QDocTagFiles::generateTagFileCompounds(QXmlStreamWriter& writer, const Inne } // Recurse to write all members. - generateTagFileMembers(writer, static_cast<const InnerNode*>(node)); + generateTagFileMembers(writer, static_cast<const Aggregate*>(node)); writer.writeEndElement(); // Recurse to write all compounds. - generateTagFileCompounds(writer, static_cast<const InnerNode*>(node)); + generateTagFileCompounds(writer, static_cast<const Aggregate*>(node)); } else { writer.writeTextElement("name", node->fullDocumentName()); writer.writeTextElement("filename", gen_->fullDocumentLocation(node, false)); // Recurse to write all members. - generateTagFileMembers(writer, static_cast<const InnerNode*>(node)); + generateTagFileMembers(writer, static_cast<const Aggregate*>(node)); writer.writeEndElement(); // Recurse to write all compounds. - generateTagFileCompounds(writer, static_cast<const InnerNode*>(node)); + generateTagFileCompounds(writer, static_cast<const Aggregate*>(node)); } } } @@ -185,7 +185,7 @@ void QDocTagFiles::generateTagFileCompounds(QXmlStreamWriter& writer, const Inne Writes all the members of the \a inner node with the \a writer. The node represents a C++ class, namespace, etc. */ -void QDocTagFiles::generateTagFileMembers(QXmlStreamWriter& writer, const InnerNode* inner) +void QDocTagFiles::generateTagFileMembers(QXmlStreamWriter& writer, const Aggregate* inner) { foreach (const Node* node, inner->childNodes()) { if (!node->url().isEmpty()) diff --git a/src/tools/qdoc/qdoctagfiles.h b/src/tools/qdoc/qdoctagfiles.h index 94d3450478..ad1d383bfd 100644 --- a/src/tools/qdoc/qdoctagfiles.h +++ b/src/tools/qdoc/qdoctagfiles.h @@ -38,7 +38,7 @@ QT_BEGIN_NAMESPACE -class InnerNode; +class Aggregate; class QDocDatabase; class Generator; @@ -53,8 +53,8 @@ class QDocTagFiles QDocTagFiles(); ~QDocTagFiles(); - void generateTagFileCompounds(QXmlStreamWriter& writer, const InnerNode* inner); - void generateTagFileMembers(QXmlStreamWriter& writer, const InnerNode* inner); + void generateTagFileCompounds(QXmlStreamWriter& writer, const Aggregate* inner); + void generateTagFileMembers(QXmlStreamWriter& writer, const Aggregate* inner); void generateTagFile(const QString& fileName, Generator* g); private: diff --git a/src/tools/qdoc/qmlvisitor.cpp b/src/tools/qdoc/qmlvisitor.cpp index 190c9f0444..4803a1d63a 100644 --- a/src/tools/qdoc/qmlvisitor.cpp +++ b/src/tools/qdoc/qmlvisitor.cpp @@ -196,7 +196,7 @@ bool QmlDocVisitor::applyDocumentation(QQmlJS::AST::SourceLocation location, Nod const TopicList& topicsUsed = doc.topicsUsed(); NodeList nodes; Node* nodePassedIn = node; - InnerNode* parent = nodePassedIn->parent(); + Aggregate* parent = nodePassedIn->parent(); node->setDoc(doc); nodes.append(node); if (topicsUsed.size() > 0) { diff --git a/src/tools/qdoc/qmlvisitor.h b/src/tools/qdoc/qmlvisitor.h index cfb167c985..8c5e8c5042 100644 --- a/src/tools/qdoc/qmlvisitor.h +++ b/src/tools/qdoc/qmlvisitor.h @@ -111,7 +111,7 @@ private: QSet<QString> commands_; QSet<QString> topics_; QSet<quint32> usedComments; - InnerNode *current; + Aggregate *current; }; QT_END_NAMESPACE diff --git a/src/tools/qdoc/tree.cpp b/src/tools/qdoc/tree.cpp index 41382be3f1..ca044ff78f 100644 --- a/src/tools/qdoc/tree.cpp +++ b/src/tools/qdoc/tree.cpp @@ -181,9 +181,9 @@ FunctionNode* Tree::findFunctionNode(const QStringList& parentPath, const Functi parent = findClassNode(parentPath, 0); if (parent == 0) parent = findNode(parentPath, 0, 0, Node::DontCare); - if (parent == 0 || !parent->isInnerNode()) + if (parent == 0 || !parent->isAggregate()) return 0; - return ((const InnerNode*)parent)->findFunctionNode(clone); + return ((const Aggregate*)parent)->findFunctionNode(clone); } @@ -249,22 +249,22 @@ const FunctionNode* Tree::findFunctionNode(const QStringList& path, int i; for (i = 0; i < path.size(); ++i) { - if (node == 0 || !node->isInnerNode()) + if (node == 0 || !node->isAggregate()) break; const Node* next; if (i == path.size() - 1) - next = ((const InnerNode*) node)->findFunctionNode(path.at(i)); + next = ((const Aggregate*) node)->findFunctionNode(path.at(i)); else - next = ((const InnerNode*) node)->findChildNode(path.at(i), genus); + next = ((const Aggregate*) node)->findChildNode(path.at(i), genus); if (!next && node->isClass() && (findFlags & SearchBaseClasses)) { NodeList baseClasses = allBaseClasses(static_cast<const ClassNode*>(node)); foreach (const Node* baseClass, baseClasses) { if (i == path.size() - 1) - next = static_cast<const InnerNode*>(baseClass)->findFunctionNode(path.at(i)); + next = static_cast<const Aggregate*>(baseClass)->findFunctionNode(path.at(i)); else - next = static_cast<const InnerNode*>(baseClass)->findChildNode(path.at(i), genus); + next = static_cast<const Aggregate*>(baseClass)->findChildNode(path.at(i), genus); if (next) break; @@ -320,10 +320,10 @@ static const NodeTypeList& relatesTypes() If a matching node is found, a pointer to it is returned. Otherwise 0 is returned. */ -InnerNode* Tree::findRelatesNode(const QStringList& path) +Aggregate* Tree::findRelatesNode(const QStringList& path) { Node* n = findNodeRecursive(path, 0, root(), relatesTypes()); - return ((n && n->isInnerNode()) ? static_cast<InnerNode*>(n) : 0); + return ((n && n->isAggregate()) ? static_cast<Aggregate*>(n) : 0); } /*! @@ -344,7 +344,7 @@ void Tree::addPropertyFunction(PropertyNode* property, This function does not resolve QML inheritance. */ -void Tree::resolveInheritance(InnerNode* n) +void Tree::resolveInheritance(Aggregate* n) { if (!n) n = root(); @@ -400,7 +400,7 @@ void Tree::resolveInheritanceHelper(int pass, ClassNode* cn) node) using the unqualified base class name. */ if (!n) { - InnerNode* parent = cn->parent(); + Aggregate* parent = cn->parent(); n = findClassNode((*b).path_, parent); } #endif @@ -441,7 +441,7 @@ void Tree::resolveProperties() propEntry = unresolvedPropertyMap.constBegin(); while (propEntry != unresolvedPropertyMap.constEnd()) { PropertyNode* property = propEntry.key(); - InnerNode* parent = property->parent(); + Aggregate* parent = property->parent(); QString getterName = (*propEntry)[PropertyNode::Getter]; QString setterName = (*propEntry)[PropertyNode::Setter]; QString resetterName = (*propEntry)[PropertyNode::Resetter]; @@ -621,7 +621,7 @@ Node* Tree::findNodeRecursive(const QStringList& path, return 0; // premature leaf } - InnerNode* current = static_cast<InnerNode*>(node); + Aggregate* current = static_cast<Aggregate*>(node); const NodeList& children = current->childNodes(); const QString& name = path.at(pathIndex); for (int i=0; i<children.size(); ++i) { @@ -677,7 +677,7 @@ Node* Tree::findNodeRecursive(const QStringList& path, if (pathIndex >= path.size()) return 0; - InnerNode* current = static_cast<InnerNode*>(start); + Aggregate* current = static_cast<Aggregate*>(start); const NodeList& children = current->childNodes(); for (int i=0; i<children.size(); ++i) { Node* n = children.at(i); @@ -777,7 +777,7 @@ const Node* Tree::findNodeForTarget(const QStringList& path, } while (current) { - if (current->isInnerNode()) { + if (current->isAggregate()) { const Node* node = matchPathAndTarget(path, path_idx, target, current, flags, genus, ref); if (node) return node; @@ -847,8 +847,8 @@ const Node* Tree::matchPathAndTarget(const QStringList& path, return t; } if (target.isEmpty()) { - if ((idx) == (path.size()-1) && node->isInnerNode() && (flags & SearchEnumValues)) { - t = static_cast<const InnerNode*>(node)->findEnumNodeForValue(path.at(idx)); + if ((idx) == (path.size()-1) && node->isAggregate() && (flags & SearchEnumValues)) { + t = static_cast<const Aggregate*>(node)->findEnumNodeForValue(path.at(idx)); if (t) return t; } @@ -862,7 +862,7 @@ const Node* Tree::matchPathAndTarget(const QStringList& path, return t; if (target.isEmpty()) { if ((idx) == (path.size()-1) && (flags & SearchEnumValues)) { - t = static_cast<const InnerNode*>(bc)->findEnumNodeForValue(path.at(idx)); + t = static_cast<const Aggregate*>(bc)->findEnumNodeForValue(path.at(idx)); if (t) return t; } @@ -914,20 +914,20 @@ const Node* Tree::findNode(const QStringList& path, } for (i = start_idx; i < path.size(); ++i) { - if (node == 0 || !node->isInnerNode()) + if (node == 0 || !node->isAggregate()) break; - const Node* next = static_cast<const InnerNode*>(node)->findChildNode(path.at(i), genus); + const Node* next = static_cast<const Aggregate*>(node)->findChildNode(path.at(i), genus); if (!next && (findFlags & SearchEnumValues) && i == path.size()-1) { - next = static_cast<const InnerNode*>(node)->findEnumNodeForValue(path.at(i)); + next = static_cast<const Aggregate*>(node)->findEnumNodeForValue(path.at(i)); } if (!next && ((genus == Node::CPP) || (genus == Node::DontCare)) && node->isClass() && (findFlags & SearchBaseClasses)) { NodeList baseClasses = allBaseClasses(static_cast<const ClassNode*>(node)); foreach (const Node* baseClass, baseClasses) { - next = static_cast<const InnerNode*>(baseClass)->findChildNode(path.at(i), genus); + next = static_cast<const Aggregate*>(baseClass)->findChildNode(path.at(i), genus); if (!next && (findFlags & SearchEnumValues) && i == path.size() - 1) - next = static_cast<const InnerNode*>(baseClass)->findEnumNodeForValue(path.at(i)); + next = static_cast<const Aggregate*>(baseClass)->findEnumNodeForValue(path.at(i)); if (next) { break; } @@ -990,7 +990,7 @@ void Tree::insertTarget(const QString& name, /*! */ -void Tree::resolveTargets(InnerNode* root) +void Tree::resolveTargets(Aggregate* root) { // need recursion foreach (Node* child, root->childNodes()) { diff --git a/src/tools/qdoc/tree.h b/src/tools/qdoc/tree.h index 28832cc038..0f41c221b6 100644 --- a/src/tools/qdoc/tree.h +++ b/src/tools/qdoc/tree.h @@ -135,21 +135,21 @@ class Tree QmlTypeNode* findQmlTypeNode(const QStringList& path); Node* findNodeByNameAndType(const QStringList& path, Node::NodeType type) const; - InnerNode* findRelatesNode(const QStringList& path); + Aggregate* findRelatesNode(const QStringList& path); QString getRef(const QString& target, const Node* node) const; void insertTarget(const QString& name, const QString& title, TargetRec::TargetType type, Node* node, int priority); - void resolveTargets(InnerNode* root); + void resolveTargets(Aggregate* root); const Node* findUnambiguousTarget(const QString& target, QString& ref) const; const DocumentNode* findDocumentNodeByTitle(const QString& title) const; void addPropertyFunction(PropertyNode *property, const QString &funcName, PropertyNode::FunctionRole funcRole); - void resolveInheritance(InnerNode* n = 0); + void resolveInheritance(Aggregate* n = 0); void resolveInheritanceHelper(int pass, ClassNode* cn); void resolveProperties(); void resolveCppToQmlLinks(); |