diff options
Diffstat (limited to 'src/qdoc/node.cpp')
-rw-r--r-- | src/qdoc/node.cpp | 463 |
1 files changed, 214 insertions, 249 deletions
diff --git a/src/qdoc/node.cpp b/src/qdoc/node.cpp index a1df93cb8..65c75e743 100644 --- a/src/qdoc/node.cpp +++ b/src/qdoc/node.cpp @@ -130,21 +130,21 @@ bool Node::changeType(NodeType from, NodeType to) if (nodeType_ == from) { nodeType_ = to; switch (to) { - case QmlType: - case QmlModule: - case QmlProperty: - case QmlBasicType: - setGenus(Node::QML); - break; - case JsType: - case JsModule: - case JsProperty: - case JsBasicType: - setGenus(Node::JS); - break; - default: - setGenus(Node::CPP); - break; + case QmlType: + case QmlModule: + case QmlProperty: + case QmlBasicType: + setGenus(Node::QML); + break; + case JsType: + case JsModule: + case JsProperty: + case JsBasicType: + setGenus(Node::JS); + break; + default: + setGenus(Node::CPP); + break; } return true; } @@ -158,8 +158,8 @@ bool Node::changeType(NodeType from, NodeType to) */ bool Node::nodeNameLessThan(const Node *n1, const Node *n2) { -#define LT_RETURN_IF_NOT_EQUAL(a, b) \ - if ((a) != (b)) \ +#define LT_RETURN_IF_NOT_EQUAL(a, b) \ + if ((a) != (b)) \ return (a) < (b); if (n1->isPageNode() && n2->isPageNode()) { @@ -661,7 +661,7 @@ QString Node::fullName(const Node *relative) const */ bool Node::match(const QVector<int> &types) const { - for (int i=0; i<types.size(); ++i) { + for (int i = 0; i < types.size(); ++i) { if (nodeType() == types.at(i)) return true; } @@ -721,8 +721,8 @@ Node::Node(NodeType type, Aggregate *parent, const QString &name) operators_.insert("&=", "bitwise-and-assign"); operators_.insert("|=", "bitwise-or-assign"); operators_.insert("^=", "bitwise-xor-assign"); - operators_.insert("<<=" ,"bitwise-left-shift-assign"); - operators_.insert(">>=" ,"bitwise-right-shift-assign"); + operators_.insert("<<=", "bitwise-left-shift-assign"); + operators_.insert(">>=", "bitwise-right-shift-assign"); operators_.insert("||", "logical-or"); operators_.insert("&&", "logical-and"); operators_.insert("()", "call"); @@ -761,38 +761,38 @@ Node::Node(NodeType type, Aggregate *parent, const QString &name) Node::PageType Node::getPageType(Node::NodeType t) { switch (t) { - case Node::Namespace: - case Node::Class: - case Node::Struct: - case Node::Union: - case Node::HeaderFile: - case Node::Enum: - case Node::Function: - case Node::Typedef: - case Node::Property: - case Node::Variable: - case Node::QmlType: - case Node::QmlProperty: - case Node::QmlBasicType: - case Node::JsType: - case Node::JsProperty: - case Node::JsBasicType: - case Node::SharedComment: - return Node::ApiPage; - case Node::Example: - return Node::ExamplePage; - case Node::Page: - case Node::ExternalPage: - return Node::NoPageType; - case Node::Group: - case Node::Module: - case Node::QmlModule: - case Node::JsModule: - case Node::Collection: - return Node::OverviewPage; - case Node::Proxy: - default: - return Node::NoPageType; + case Node::Namespace: + case Node::Class: + case Node::Struct: + case Node::Union: + case Node::HeaderFile: + case Node::Enum: + case Node::Function: + case Node::Typedef: + case Node::Property: + case Node::Variable: + case Node::QmlType: + case Node::QmlProperty: + case Node::QmlBasicType: + case Node::JsType: + case Node::JsProperty: + case Node::JsBasicType: + case Node::SharedComment: + return Node::ApiPage; + case Node::Example: + return Node::ExamplePage; + case Node::Page: + case Node::ExternalPage: + return Node::NoPageType; + case Node::Group: + case Node::Module: + case Node::QmlModule: + case Node::JsModule: + case Node::Collection: + return Node::OverviewPage; + case Node::Proxy: + default: + return Node::NoPageType; } } @@ -808,38 +808,38 @@ Node::PageType Node::getPageType(Node::NodeType t) Node::Genus Node::getGenus(Node::NodeType t) { switch (t) { - case Node::Enum: - case Node::Class: - case Node::Struct: - case Node::Union: - case Node::Module: - case Node::Typedef: - case Node::Property: - case Node::Variable: - case Node::Function: - case Node::Namespace: - case Node::HeaderFile: - return Node::CPP; - case Node::QmlType: - case Node::QmlModule: - case Node::QmlProperty: - case Node::QmlBasicType: - return Node::QML; - case Node::JsType: - case Node::JsModule: - case Node::JsProperty: - case Node::JsBasicType: - return Node::JS; - case Node::Page: - case Node::Group: - case Node::Example: - case Node::ExternalPage: - return Node::DOC; - case Node::Collection: - case Node::SharedComment: - case Node::Proxy: - default: - return Node::DontCare; + case Node::Enum: + case Node::Class: + case Node::Struct: + case Node::Union: + case Node::Module: + case Node::Typedef: + case Node::Property: + case Node::Variable: + case Node::Function: + case Node::Namespace: + case Node::HeaderFile: + return Node::CPP; + case Node::QmlType: + case Node::QmlModule: + case Node::QmlProperty: + case Node::QmlBasicType: + return Node::QML; + case Node::JsType: + case Node::JsModule: + case Node::JsProperty: + case Node::JsBasicType: + return Node::JS; + case Node::Page: + case Node::Group: + case Node::Example: + case Node::ExternalPage: + return Node::DOC; + case Node::Collection: + case Node::SharedComment: + case Node::Proxy: + default: + return Node::DontCare; } } @@ -1079,19 +1079,16 @@ QString Node::accessString() const QString Node::extractClassName(const QString &string) const { QString result; - for (int i=0; i<=string.size(); ++i) { + for (int i = 0; i <= string.size(); ++i) { QChar ch; if (i != string.size()) ch = string.at(i); QChar lower = ch.toLower(); - if ((lower >= QLatin1Char('a') && lower <= QLatin1Char('z')) || - ch.digitValue() >= 0 || - ch == QLatin1Char('_') || - ch == QLatin1Char(':')) { + if ((lower >= QLatin1Char('a') && lower <= QLatin1Char('z')) || ch.digitValue() >= 0 + || ch == QLatin1Char('_') || ch == QLatin1Char(':')) { result += ch; - } - else if (!result.isEmpty()) { + } else if (!result.isEmpty()) { if (result != QLatin1String("const")) return result; result.clear(); @@ -1126,7 +1123,6 @@ Node::ThreadSafeness Node::inheritedThreadSafeness() const return safeness_; } - /*! If this node is a QML or JS type node, return a pointer to it. If it is a child of a QML or JS type node, return the @@ -1193,7 +1189,7 @@ Aggregate *Node::root() const /*! Returns a pointer to the Tree this node is in. */ -Tree* Node::tree() const +Tree *Node::tree() const { return root()->tree(); } @@ -1203,7 +1199,7 @@ Tree* Node::tree() const location, or both, depending on the suffix of the file name from the file path in location \a t. */ -void Node::setLocation(const Location& t) +void Node::setLocation(const Location &t) { QString suffix = t.fileSuffix(); if (suffix == "h") @@ -1247,7 +1243,6 @@ QString Node::qualifyWithParentName() return name_; } - /*! Returns the QML node's qualified name by stripping off the "QML:" if present and prepending the logical module name. @@ -1344,58 +1339,41 @@ QString Node::cleanId(const QString &str) const QChar c = name[0]; const uint u = c.unicode(); - if ((u >= 'a' && u <= 'z') || - (u >= 'A' && u <= 'Z') || - (u >= '0' && u <= '9')) { + if ((u >= 'a' && u <= 'z') || (u >= 'A' && u <= 'Z') || (u >= '0' && u <= '9')) { clean += c; - } - else if (u == '~') { + } else if (u == '~') { clean += "dtor."; - } - else if (u == '_') { + } else if (u == '_') { clean += "underscore."; - } - else { + } else { clean += QLatin1Char('a'); } for (int i = 1; i < name.length(); i++) { const QChar c = name[i]; const uint u = c.unicode(); - if ((u >= 'a' && u <= 'z') || - (u >= 'A' && u <= 'Z') || - (u >= '0' && u <= '9') || u == '-' || - u == '_' || u == '.') { + if ((u >= 'a' && u <= 'z') || (u >= 'A' && u <= 'Z') || (u >= '0' && u <= '9') || u == '-' + || u == '_' || u == '.') { clean += c; - } - else if (c.isSpace() || u == ':' ) { + } else if (c.isSpace() || u == ':') { clean += QLatin1Char('-'); - } - else if (u == '!') { + } else if (u == '!') { clean += "-not"; - } - else if (u == '&') { + } else if (u == '&') { clean += "-and"; - } - else if (u == '<') { + } else if (u == '<') { clean += "-lt"; - } - else if (u == '=') { + } else if (u == '=') { clean += "-eq"; - } - else if (u == '>') { + } else if (u == '>') { clean += "-gt"; - } - else if (u == '#') { + } else if (u == '#') { clean += "-hash"; - } - else if (u == '(') { + } else if (u == '(') { clean += QLatin1Char('-'); - } - else if (u == ')') { + } else if (u == ')') { clean += QLatin1Char('-'); - } - else { + } else { clean += QLatin1Char('-'); clean += QString::number((int)u, 16); } @@ -2007,13 +1985,9 @@ Node *Aggregate::findChildNode(const QString &name, Node::Genus genus, int findF Node *node = nodes.at(i); if (genus == node->genus()) { if (findFlags & TypesOnly) { - if (!node->isTypedef() - && !node->isClassNode() - && !node->isQmlType() - && !node->isQmlBasicType() - && !node->isJsType() - && !node->isJsBasicType() - && !node->isEnumType()) + if (!node->isTypedef() && !node->isClassNode() && !node->isQmlType() + && !node->isQmlBasicType() && !node->isJsType() + && !node->isJsBasicType() && !node->isEnumType()) continue; } else if (findFlags & IgnoreModules && node->isModule()) continue; @@ -2053,8 +2027,8 @@ void Aggregate::findChildren(const QString &name, NodeVector &nodes) const nodes.reserve(nonfunctionCount); } if (nonfunctionCount > 0) { - for (auto it = nonfunctionMap_.find(name); - it != nonfunctionMap_.end() && it.key() == name; ++it) { + for (auto it = nonfunctionMap_.find(name); it != nonfunctionMap_.end() && it.key() == name; + ++it) { nodes.append(it.value()); } } @@ -2067,10 +2041,10 @@ void Aggregate::findChildren(const QString &name, NodeVector &nodes) const passed must be one of the isXxx() functions in class Node that tests the node type. */ -Node *Aggregate::findNonfunctionChild(const QString &name, bool (Node::*isMatch) () const) +Node *Aggregate::findNonfunctionChild(const QString &name, bool (Node::*isMatch)() const) { NodeList nodes = nonfunctionMap_.values(name); - for (int i=0; i<nodes.size(); ++i) { + for (int i = 0; i < nodes.size(); ++i) { Node *node = nodes.at(i); if ((node->*(isMatch))()) return node; @@ -2540,7 +2514,7 @@ void Aggregate::printChildren(const QString &title) { qDebug() << title << name() << children_.size(); if (children_.size() > 0) { - for (int i=0; i<children_.size(); ++i) { + for (int i = 0; i < children_.size(); ++i) { Node *n = children_.at(i); qDebug() << " CHILD:" << n->name() << n->nodeTypeString(); } @@ -2570,8 +2544,7 @@ void Aggregate::removeFunctionNode(FunctionNode *fn) it.value() = fn->nextOverload(); fn->setNextOverload(nullptr); fn->setOverloadNumber(0); - } - else { + } else { functionMap_.erase(it); } } else { @@ -2599,11 +2572,7 @@ void Aggregate::removeFunctionNode(FunctionNode *fn) */ static bool keep(FunctionNode *fn) { - if (fn->isPrivate() || - fn->isObsolete() || - fn->isInternal() || - fn->isSomeCtor() || - fn->isDtor()) + if (fn->isPrivate() || fn->isObsolete() || fn->isInternal() || fn->isSomeCtor() || fn->isDtor()) return false; return true; } @@ -2668,9 +2637,9 @@ bool Aggregate::hasObsoleteMembers() const { for (const auto *node : children_) { if (!node->isPrivate() && node->isObsolete()) { - if (node->isFunction() || node->isProperty() || node->isEnumType() || - node->isTypedef() || node->isTypeAlias() || node->isVariable() || - node->isQmlProperty() || node->isJsProperty()) + if (node->isFunction() || node->isProperty() || node->isEnumType() || node->isTypedef() + || node->isTypeAlias() || node->isVariable() || node->isQmlProperty() + || node->isJsProperty()) return true; } } @@ -2700,7 +2669,8 @@ void Aggregate::findAllObsoleteThings() } else if (node->isQmlType() || node->isJsType()) { Aggregate *a = static_cast<Aggregate *>(node); if (a->hasObsoleteMembers()) - QDocDatabase::qmlTypesWithObsoleteMembers().insert(node->qualifyQmlName(), node); + QDocDatabase::qmlTypesWithObsoleteMembers().insert(node->qualifyQmlName(), + node); } else if (node->isAggregate()) { static_cast<Aggregate *>(node)->findAllObsoleteThings(); } @@ -2716,14 +2686,15 @@ void Aggregate::findAllObsoleteThings() void Aggregate::findAllClasses() { for (auto *node : qAsConst(children_)) { - if (!node->isPrivate() && !node->isInternal() && - node->tree()->camelCaseModuleName() != QString("QDoc")) { + if (!node->isPrivate() && !node->isInternal() + && node->tree()->camelCaseModuleName() != QString("QDoc")) { if (node->isClassNode()) { QDocDatabase::cppClasses().insert(node->qualifyCppName().toLower(), node); - } else if (node->isQmlType() || node->isQmlBasicType() || node->isJsType() || node->isJsBasicType()) { + } else if (node->isQmlType() || node->isQmlBasicType() || node->isJsType() + || node->isJsBasicType()) { QString name = node->unqualifyQmlName(); QDocDatabase::qmlTypes().insert(name, node); - //also add to the QML basic type map + // also add to the QML basic type map if (node->isQmlBasicType() || node->isJsBasicType()) QDocDatabase::qmlBasicTypes().insert(name, node); } else if (node->isExample()) { @@ -2785,8 +2756,7 @@ void Aggregate::findAllSince() FunctionNode *fn = static_cast<FunctionNode *>(node); if (!fn->isObsolete() && !fn->isSomeCtor() && !fn->isDtor()) nsmap.value().insert(fn->name(), fn); - } - else if (node->isClassNode()) { + } else if (node->isClassNode()) { // Insert classes into the since and class maps. QString name = node->qualifyWithParentName(); nsmap.value().insert(name, node); @@ -2837,7 +2807,7 @@ void Aggregate::resolveQmlInheritance() } else { if (!type->importList().isEmpty()) { const ImportList &imports = type->importList(); - for (int i=0; i<imports.size(); ++i) { + for (int i = 0; i < imports.size(); ++i) { base = QDocDatabase::qdocDB()->findQmlType(imports[i], type->qmlBaseName()); if (base && (base != type)) { if (base->logicalModuleVersion()[0] != imports[i].version_[0]) @@ -2966,8 +2936,7 @@ void ClassNode::removePrivateAndInternalBases() bases_.removeAt(i); ignoredBases_.append(rc); promotePublicBases(bc->baseClasses()); - } - else { + } else { ++i; } found.insert(bc); @@ -2981,8 +2950,7 @@ void ClassNode::removePrivateAndInternalBases() const QVector<RelatedClass> &dd = dc->derivedClasses(); for (int j = dd.size() - 1; j >= 0; --j) derived_.insert(i, dd.at(j)); - } - else { + } else { ++i; } } @@ -3000,8 +2968,7 @@ void ClassNode::resolvePropertyOverriddenFromPtrs(PropertyNode *pn) PropertyNode *baseProperty = static_cast<PropertyNode *>(n); cn->resolvePropertyOverriddenFromPtrs(baseProperty); pn->setOverriddenFrom(baseProperty); - } - else + } else cn->resolvePropertyOverriddenFromPtrs(pn); } } @@ -3099,8 +3066,12 @@ void NamespaceNode::reportDocumentedChildrenInUndocumentedNamespace() const QString msg1 = node->name(); if (node->isFunction()) msg1 += "()"; - msg1 += tr(" is documented, but namespace %1 is not documented in any module.").arg(name()); - QString msg2 = tr("Add /*! '\\%1 %2' ... */ or remove the qdoc comment marker (!) at that line number.").arg(COMMAND_NAMESPACE).arg(name()); + msg1 += tr(" is documented, but namespace %1 is not documented in any module.") + .arg(name()); + QString msg2 = tr("Add /*! '\\%1 %2' ... */ or remove the qdoc comment marker (!) at " + "that line number.") + .arg(COMMAND_NAMESPACE) + .arg(name()); node->doc().location().warning(msg1, msg2); } @@ -3346,8 +3317,7 @@ void ClassNode::addDerivedClass(Access access, ClassNode *node) before the generate phase of qdoc. In an unresolved base class, the pointer to the base class node is 0. */ -void ClassNode::addUnresolvedBaseClass(Access access, - const QStringList &path, +void ClassNode::addUnresolvedBaseClass(Access access, const QStringList &path, const QString &signature) { bases_.append(RelatedClass(access, path, signature)); @@ -3454,7 +3424,8 @@ FunctionNode *ClassNode::findOverriddenFunction(const FunctionNode *fn) } if (cn != nullptr) { FunctionNode *result = cn->findFunctionChild(fn); - if (result != nullptr && !result->isInternal() && !result->isNonvirtual() && result->hasDoc()) + if (result != nullptr && !result->isInternal() && !result->isNonvirtual() + && result->hasDoc()) return result; result = cn->findOverriddenFunction(fn); if (result != nullptr && !result->isNonvirtual()) @@ -3716,7 +3687,7 @@ bool PageNode::setTitle(const QString &title) /*! Add \a item to the enum type's item list. */ -void EnumNode::addItem(const EnumItem& item) +void EnumNode::addItem(const EnumItem &item) { items_.append(item); names_.insert(item.name()); @@ -3987,27 +3958,27 @@ static void buildTopicMetanessMap() Node::Genus FunctionNode::getGenus(FunctionNode::Metaness t) { switch (t) { - case FunctionNode::Plain: - case FunctionNode::Signal: - case FunctionNode::Slot: - case FunctionNode::Ctor: - case FunctionNode::Dtor: - case FunctionNode::CCtor: - case FunctionNode::MCtor: - case FunctionNode::MacroWithParams: - case FunctionNode::MacroWithoutParams: - case FunctionNode::Native: - case FunctionNode::CAssign: - case FunctionNode::MAssign: - return Node::CPP; - case FunctionNode::QmlSignal: - case FunctionNode::QmlSignalHandler: - case FunctionNode::QmlMethod: - return Node::QML; - case FunctionNode::JsSignal: - case FunctionNode::JsSignalHandler: - case FunctionNode::JsMethod: - return Node::JS; + case FunctionNode::Plain: + case FunctionNode::Signal: + case FunctionNode::Slot: + case FunctionNode::Ctor: + case FunctionNode::Dtor: + case FunctionNode::CCtor: + case FunctionNode::MCtor: + case FunctionNode::MacroWithParams: + case FunctionNode::MacroWithoutParams: + case FunctionNode::Native: + case FunctionNode::CAssign: + case FunctionNode::MAssign: + return Node::CPP; + case FunctionNode::QmlSignal: + case FunctionNode::QmlSignalHandler: + case FunctionNode::QmlMethod: + return Node::QML; + case FunctionNode::JsSignal: + case FunctionNode::JsSignalHandler: + case FunctionNode::JsMethod: + return Node::JS; } return Node::DontCare; } @@ -4066,19 +4037,19 @@ bool FunctionNode::changeMetaness(Metaness from, Metaness to) if (metaness_ == from) { metaness_ = to; switch (to) { - case QmlSignal: - case QmlSignalHandler: - case QmlMethod: - setGenus(Node::QML); - break; - case JsSignal: - case JsSignalHandler: - case JsMethod: - setGenus(Node::JS); - break; - default: - setGenus(Node::CPP); - break; + case QmlSignal: + case QmlSignalHandler: + case QmlMethod: + setGenus(Node::QML); + break; + case JsSignal: + case JsSignalHandler: + case JsMethod: + setGenus(Node::JS); + break; + default: + setGenus(Node::CPP); + break; } return true; } @@ -4157,20 +4128,20 @@ FunctionNode *FunctionNode::findPrimaryFunction() QString FunctionNode::kindString() const { switch (metaness_) { - case FunctionNode::QmlSignal: - return "QML signal"; - case FunctionNode::QmlSignalHandler: - return "QML signal handler"; - case FunctionNode::QmlMethod: - return "QML method"; - case FunctionNode::JsSignal: - return "JS signal"; - case FunctionNode::JsSignalHandler: - return "JS signal handler"; - case FunctionNode::JsMethod: - return "JS method"; - default: - return "function"; + case FunctionNode::QmlSignal: + return "QML signal"; + case FunctionNode::QmlSignalHandler: + return "QML signal handler"; + case FunctionNode::QmlMethod: + return "QML method"; + case FunctionNode::JsSignal: + return "JS signal"; + case FunctionNode::JsSignalHandler: + return "JS signal handler"; + case FunctionNode::JsMethod: + return "JS method"; + default: + return "function"; } } @@ -4283,9 +4254,9 @@ QString FunctionNode::signature(bool values, bool noReturnType) const */ PropertyNode::FunctionRole PropertyNode::role(const FunctionNode *fn) const { - for (int i=0; i<4; i++) { + for (int i = 0; i < 4; i++) { if (functions_[i].contains(const_cast<FunctionNode *>(fn))) - return (FunctionRole) i; + return (FunctionRole)i; } return Notifier; } @@ -4307,8 +4278,8 @@ Node *VariableNode::clone(Aggregate *parent) */ void FunctionNode::debug() const { - qDebug("QML METHOD %s returnType_ %s parentPath_ %s", - qPrintable(name()), qPrintable(returnType_), qPrintable(parentPath_.join(' '))); + qDebug("QML METHOD %s returnType_ %s parentPath_ %s", qPrintable(name()), + qPrintable(returnType_), qPrintable(parentPath_.join(' '))); } /*! @@ -4358,11 +4329,9 @@ bool FunctionNode::compare(const FunctionNode *fn) const bool FunctionNode::isIgnored() const { if (!hasDoc() && !hasSharedDoc()) { - if (name().startsWith(QLatin1String("qt_")) || - name() == QLatin1String("metaObject") || - name() == QLatin1String("tr") || - name() == QLatin1String("trUtf8") || - name() == QLatin1String("d_func")) { + if (name().startsWith(QLatin1String("qt_")) || name() == QLatin1String("metaObject") + || name() == QLatin1String("tr") || name() == QLatin1String("trUtf8") + || name() == QLatin1String("d_func")) { return true; } QString s = signature(false, false); @@ -4458,16 +4427,14 @@ QString PropertyNode::qualifiedDataType() const if (type_.contains(QLatin1Char('*')) || type_.contains(QLatin1Char('&'))) { // 'QWidget *' becomes 'QWidget *' const return type_ + " const"; - } - else { + } else { /* 'int' becomes 'const int' ('int const' is correct C++, but looks wrong) */ return "const " + type_; } - } - else { + } else { return type_; } } @@ -4554,7 +4521,6 @@ void QmlTypeNode::subclasses(const Node *base, NodeList &subs) } } - /*! If this QML type node has a base type node, return the fully qualified name of that QML @@ -4628,9 +4594,7 @@ QmlBasicTypeNode::QmlBasicTypeNode(Aggregate *parent, const QString &name, Node: /*! Constructor for the QML property node. */ -QmlPropertyNode::QmlPropertyNode(Aggregate *parent, - const QString &name, - const QString &type, +QmlPropertyNode::QmlPropertyNode(Aggregate *parent, const QString &name, const QString &type, bool attached) : Node(parent->isJsType() ? JsProperty : QmlProperty, parent, name), type_(type), @@ -4672,16 +4636,20 @@ bool QmlPropertyNode::isWritable() if (pn) return pn->isWritable(); else - defLocation().warning(tr("No Q_PROPERTY for QML property %1::%2::%3 " - "in C++ class documented as QML type: " - "(property not found in the C++ class or its base classes)") - .arg(logicalModuleName()).arg(qmlTypeName()).arg(name())); - } - else + defLocation().warning( + tr("No Q_PROPERTY for QML property %1::%2::%3 " + "in C++ class documented as QML type: " + "(property not found in the C++ class or its base classes)") + .arg(logicalModuleName()) + .arg(qmlTypeName()) + .arg(name())); + } else defLocation().warning(tr("No Q_PROPERTY for QML property %1::%2::%3 " "in C++ class documented as QML type: " "(C++ class not specified or not found).") - .arg(logicalModuleName()).arg(qmlTypeName()).arg(name())); + .arg(logicalModuleName()) + .arg(qmlTypeName()) + .arg(name())); } } return true; @@ -4729,8 +4697,7 @@ PropertyNode *QmlPropertyNode::findCorrespondingCppProperty() */ return (pn2 ? pn2 : pn); } - } - else + } else return pn; } } @@ -4767,8 +4734,7 @@ PropertyNode *QmlPropertyNode::findCorrespondingCppProperty() appends this node to that Tree's proxy list so it will be easy to find later. */ -ProxyNode::ProxyNode(Aggregate *parent, const QString &name) - : Aggregate(Node::Proxy, parent, name) +ProxyNode::ProxyNode(Aggregate *parent, const QString &name) : Aggregate(Node::Proxy, parent, name) { tree()->appendProxy(this); } @@ -4841,7 +4807,7 @@ bool CollectionNode::hasClasses() const Loads \a out with all this collection node's members that are namespace nodes. */ -void CollectionNode::getMemberNamespaces(NodeMap& out) +void CollectionNode::getMemberNamespaces(NodeMap &out) { out.clear(); for (const auto &member : qAsConst(members_)) { @@ -4854,7 +4820,7 @@ void CollectionNode::getMemberNamespaces(NodeMap& out) Loads \a out with all this collection node's members that are class nodes. */ -void CollectionNode::getMemberClasses(NodeMap& out) const +void CollectionNode::getMemberClasses(NodeMap &out) const { out.clear(); for (const auto &i : qAsConst(members_)) { @@ -4944,7 +4910,6 @@ Node *SharedCommentNode::clone(Aggregate *parent) return scn; } - /*! Sets the related nonmember flag in this node and in each node in the shared comment's collective. |