summaryrefslogtreecommitdiffstats
path: root/tests/auto/qdoc/generatedoutput/expected_output/properties/qml-thetype.html
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2022-05-25 21:59:06 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-06-13 09:52:47 +0000
commitaa20eefca427123e591ff05af452b3c0c4805589 (patch)
treec0039111574911426808e9606907eec36f682272 /tests/auto/qdoc/generatedoutput/expected_output/properties/qml-thetype.html
parent7b52506eb739536867655692cc247fa9ac45cef7 (diff)
qdoc: Automatically resolve read-only attribute for QML properties
QDoc had code for automatically resolving the writability of a QML property for properties that have an associated C++ property declaration. However, this code path was never executed as it was behind a conditional statement that always resolved to false. Enable the automatic resolution - note that in Qt, many QML types are nowadays implemented so that the C++ type is exposed to QML via a private class that modify/extend the public type listed in the documentation using the \instantiates command. Relations of these private implementations to QML types are not possible for QDoc to resolve; therefore this feature does not produce reliable results for all existing properties. To address this, turn the previous documentation warnings into a debug message; these can be used to find the properties for which auto-resolution fails; the \readonly command can be then inserted manually as needed, or the public \instantiates C++ type declaration can be amended with a QDOC_PROPERTY() macro. Fixes: QTBUG-103828 Change-Id: I41ff613650668aef336394582ccc6f2b860fe8e1 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io> (cherry picked from commit 4be3d11129af9e26cd52b4a0b0c55c97f9a7b896) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto/qdoc/generatedoutput/expected_output/properties/qml-thetype.html')
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/properties/qml-thetype.html43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/properties/qml-thetype.html b/tests/auto/qdoc/generatedoutput/expected_output/properties/qml-thetype.html
new file mode 100644
index 000000000..f518fe2bb
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/properties/qml-thetype.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- properties.qdoc -->
+ <title>TheType QML Type | TestCPP</title>
+</head>
+<body>
+<li>TheType</li>
+<div class="sidebar">
+<div class="toc">
+<h3 id="toc">Contents</h3>
+<ul>
+<li class="level1"><a href="#properties">Properties</a></li>
+<li class="level1"><a href="#details">Detailed Description</a></li>
+</ul>
+</div>
+<div class="sidebar-content" id="sidebar-content"></div></div>
+<h1 class="title">TheType QML Type</h1>
+<div class="table"><table class="alignedsummary">
+<tr><td class="memItemLeft rightAlign topAlign"> Instantiates:</td><td class="memItemRight bottomAlign"> <a href="testqdoc-testderived.html">TestDerived</a></td></tr></table></div><ul>
+<li><a href="qml-thetype-members.html">List of all members, including inherited members</a></li>
+</ul>
+<h2 id="properties">Properties</h2>
+<ul>
+<li class="fn"><b><a href="qml-thetype.html#name-prop">name</a></b> : string</li>
+</ul>
+<!-- $$$TheType-description -->
+<h2 id="details">Detailed Description</h2>
+<!-- @@@TheType -->
+<h2>Property Documentation</h2>
+<!-- $$$name -->
+<div class="qmlitem"><div class="qmlproto">
+<div class="table"><table class="qmlname">
+<tr valign="top" class="odd" id="name-prop">
+<td class="tblQmlPropNode"><p>
+<span class="qmlextra">[read-only] </span><span class="name">name</span> : <span class="type">string</span></p></td></tr>
+</table></div></div>
+<div class="qmldoc"><p>Read-only status of this property is resolved from Q_PROPERTY.</p>
+</div></div><!-- @@@name -->
+<br/>
+</body>
+</html>