diff options
author | Topi Reinio <topi.reinio@qt.io> | 2022-05-25 21:59:06 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-06-13 09:52:47 +0000 |
commit | aa20eefca427123e591ff05af452b3c0c4805589 (patch) | |
tree | c0039111574911426808e9606907eec36f682272 /tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp | |
parent | 7b52506eb739536867655692cc247fa9ac45cef7 (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/tst_generatedoutput.cpp')
-rw-r--r-- | tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp b/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp index c53c10acc..5fa03f486 100644 --- a/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp +++ b/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp @@ -529,6 +529,7 @@ void tst_generatedOutput::properties() testAndCompare("testdata/configs/properties.qdocconf", "properties/testqdoc-testderived.html " "properties/testqdoc-testderived-members.html " + "properties/qml-thetype.html " "properties/testcpp.index " "properties-docbook/testqdoc-testderived.xml", m_extraParams.toLatin1().data()); |