diff options
author | Luca Di Sera <luca.disera@qt.io> | 2022-05-11 14:58:34 +0200 |
---|---|---|
committer | Luca Di Sera <luca.disera@qt.io> | 2022-05-18 07:17:13 +0000 |
commit | efe7e0cdb578ffa7fe8c8bdfacd71696d8c6d6a7 (patch) | |
tree | 50b14fff6ceafee129af5b3c50a75506300f0468 /src/qdoc/cppcodemarker.cpp | |
parent | f0f9c1d99a360ead849ab2c199c9801b80fff6a9 (diff) | |
download | qttools-efe7e0cdb578ffa7fe8c8bdfacd71696d8c6d6a7.tar.gz |
QDoc: Contextualize QML methods/properties in sincelists
QDoc allows the construction of a summary page based on user-provided
`\since` information through the `\sincelist` command, to present an
overview of the changes occurring between versions of the software.
The list presents, among other, newly introduced QML methods and
properties, but does so in a flat-way where the methods/properties
not contextualized to the QML types holding them.
To provide a more easily digestible and useful list of the new QML
features, the presentation of QML methods and properties was modified
follow the same presentation, for consistency, that CPP's member
functions follow, showing each new element under a reference to the
holding parent.
Furthermore, the presentation of QML properties was modified to include
information about the type of the property itself, which was previously
missing.
Fixes: QTBUG-102088
Pick-to: 6.3 6.2
Change-Id: I7007614e8db21164e9525c160c6ea124218c5bb3
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/qdoc/cppcodemarker.cpp')
-rw-r--r-- | src/qdoc/cppcodemarker.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/qdoc/cppcodemarker.cpp b/src/qdoc/cppcodemarker.cpp index 91f0c4c00..8051a1900 100644 --- a/src/qdoc/cppcodemarker.cpp +++ b/src/qdoc/cppcodemarker.cpp @@ -91,7 +91,6 @@ QString CppCodeMarker::markedUpSynopsis(const Node *node, const Node * /* relati { const int MaxEnumValues = 6; const FunctionNode *func; - const PropertyNode *property; const VariableNode *variable; const EnumNode *enume; QString synopsis; @@ -220,10 +219,16 @@ QString CppCodeMarker::markedUpSynopsis(const Node *node, const Node * /* relati synopsis = "flags "; synopsis += name; break; - case Node::Property: - property = static_cast<const PropertyNode *>(node); + case Node::Property: { + auto property = static_cast<const PropertyNode *>(node); synopsis = name + " : " + typified(property->qualifiedDataType()); break; + } + case Node::QmlProperty: { + auto property = static_cast<const QmlPropertyNode *>(node); + synopsis = name + " : " + typified(property->dataType()); + break; + } case Node::Variable: variable = static_cast<const VariableNode *>(node); if (style == Section::AllMembers) { |