summaryrefslogtreecommitdiff
path: root/src/qdoc/cppcodemarker.cpp
diff options
context:
space:
mode:
authorLuca Di Sera <luca.disera@qt.io>2022-08-31 16:02:00 +0200
committerLuca Di Sera <luca.disera@qt.io>2022-09-01 08:33:32 +0000
commitbf9844f40b1e83b4c4bfb3b1b495b36fce078ec5 (patch)
treedcfeb502025e066f1058f907905dbae9915c06e1 /src/qdoc/cppcodemarker.cpp
parent047aff2add055bd5370fecfa98c371b5197beeed (diff)
downloadqttools-bf9844f40b1e83b4c4bfb3b1b495b36fce078ec5.tar.gz
QDoc: Remove setDesignable/setScriptable from [Qml]PropertyNode
Properties in the Qt property system can be, among other things, "designable" and "scriptable". A property that is "designable", that is, has the `DESIGNABLE` attribute, which is by default true, will generally be visible in some of Qt's GUI editor, such as Qt Designer. A property that is "scriptable", that is, has the `SCRIPTABLE` attribute, which is by default true, will generally be accessible by scripting engines (e.g QML engine). QDoc represents properties as the `PropertyNode` and `QmlPropertyNode` classes. During the parsing phase, in `clangcodeparser`, property declarations are parsed to generate correspective `Node`s that represent them, to allow the documentation of such elements. During this process, the `DESIGNABLE` attribute and the `SCRIPTABLE` attribute are taken into account and their "value" is stored into the produced property node. Nonetheless, the state of the attribute is never accessed during a QDoc execution, as we don't show information about "designability" and "scriptability" to the user. It is currently unknown if that information could be useful to the user, such that we should show it in the output documentation or if it could be used to discern between branching paths with regards to generating the property documentation itself. At the current time, nothing of the sort is done, so that any code related to those two attributes is to be considered dead. Hence, `PropertyNode::setDesignable`, `PropertyNode::setScriptable` and `QmlPropertyNode::setDesignable` were removed. The internal members of `PropertyNode`, `m_designable` and `m_scriptable`, and `QmlPropertyNode`, `m_designable`, were removed as they are now unused. A usage of `PropertyNode::m_designable` and `PropertyNode::m_scriptable` was removed in the implementation of `PropertyNode::setOverriddenFrom`, where the members where set based on the base property that the `PropertyNode` was overriding. Furthermore, `PropertyNode::designableDefault`, which was intended to represent the default value of the `DESIGNABLE` attribute for a property, was removed as it was unused. The code in `ClangCodeParser` that took care of setting the "DESIGNABLE" and "SCRIPTABLE" attribute was removed as a consequence of the other removals. Change-Id: I36cce8e3dd91af99dd6773160fd44b596762a49e Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/qdoc/cppcodemarker.cpp')
0 files changed, 0 insertions, 0 deletions