QDoc: Replace qmlElement with qmlNativeType in ClassNode
Since the introduction of the new '\nativetype' command and the subsequent deprecation of the '\instantiates' command, the notion of a "qml element" that belongs to a `ClassNode` is made redundant. The only external use of the related API in `ClassNode` is in `Tree::resolveCppToQmlLinks`. This change replaces the call to `setQmlElement` with a call to `insertQmlNativeType`, which is the corresponding setter for the new QDoc command. This ensures full feature parity between the new and old commands, and leaves the setter, getter, and data member in `ClassNode` unused, and therefore removed. Task-number: QTBUG-125368 Change-Id: If0b541844f27fe4455ad1ae27c82d471611e2e81 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This commit is contained in:
@@ -41,8 +41,6 @@ public:
|
||||
|
||||
[[nodiscard]] const QList<RelatedClass> &baseClasses() const { return m_bases; }
|
||||
|
||||
QmlTypeNode *qmlElement() { return m_qmlElement; }
|
||||
void setQmlElement(QmlTypeNode *qcn) { m_qmlElement = qcn; }
|
||||
[[nodiscard]] bool isAbstract() const override { return m_abstract; }
|
||||
void setAbstract(bool b) override { m_abstract = b; }
|
||||
PropertyNode *findPropertyNode(const QString &name);
|
||||
@@ -63,7 +61,6 @@ private:
|
||||
QList<RelatedClass> m_ignoredBases {};
|
||||
bool m_abstract { false };
|
||||
bool m_wrapper { false };
|
||||
QmlTypeNode *m_qmlElement { nullptr };
|
||||
QSet<QmlTypeNode *> m_nativeTypeForQml;
|
||||
};
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ void Tree::resolveCppToQmlLinks()
|
||||
auto *qcn = static_cast<QmlTypeNode *>(child);
|
||||
auto *cn = const_cast<ClassNode *>(qcn->classNode());
|
||||
if (cn)
|
||||
cn->setQmlElement(qcn);
|
||||
cn->insertQmlNativeType(qcn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user