diff options
author | Topi Reinio <topi.reinio@qt.io> | 2023-05-16 10:38:31 +0000 |
---|---|---|
committer | Topi Reinio <topi.reinio@qt.io> | 2023-05-16 11:39:28 +0000 |
commit | 3eae45a5d6b87a3d74f2240c5f172dc8be4a2270 (patch) | |
tree | 2db9b011912b7717a8178768dfcc8f49a179816c /src/qev | |
parent | 00d6670f8c92843a6d881b414316f88f5adab994 (diff) | |
download | qttools-3eae45a5d6b87a3d74f2240c5f172dc8be4a2270.tar.gz |
qdoc: Store read-only attribute to index for C++ properties
The .index files were missing an attribute for C++ properties that
are read-only.
For a PropertyNode, if setWritable() was not explicitly called,
the read-only status was based on whether the property's access
functions included a getter method. When reading nodes from an index,
these access functions are not restored when constructing a
PropertyNode as that information is not needed anymore. A side-effect
of this was that all C++ property nodes read from index were
considered read-only.
QDoc also supports resolving the read-only status for a QML property
based on the associated C++ property of a class that the parent QML
type instantiates. If this instantiated class was read from index,
that meant that the read-only status was resolved incorrectly.
To fix, add writable="false" attribute for all read-only C++ properties
written to index, and explicitly call setWritable() when reading them
back in.
Pick-to: 6.5
Fixes: QTBUG-113015
Change-Id: Iaf8276a892d9a764fed9a67ebd005481c16bba17
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/qev')
0 files changed, 0 insertions, 0 deletions