summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/cppcodemarker.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2015-06-03 14:18:51 +0200
committerMartin Smith <martin.smith@digia.com>2015-06-10 12:47:02 +0000
commitd884420b94abc637b2fcef6585a1fb5c93b69c2c (patch)
treebb229430f4c1ec3b986423994ca4bd04ef6e8fa4 /src/tools/qdoc/cppcodemarker.cpp
parent9b58fe5c264cabe6912bb4fb7b045c2aecd98cb7 (diff)
qdoc: Improve documentation for properties
This update changes how qdoc handles getter, setter, resetter, and notifier functions for properties. With this update, if you provide documentation for any of these functions associated with a property, links to that function will go to the documentation for that function, instead of to the associated property. Additionally, the documentation for the function will have a note added, e.g. "Note: Notifier signal for property fubar," where the fubar property name is a link to the documentation for property fubar. Change-Id: I1f821fd4a6c2de142da4718ef3bdde314dc59627 Task-number: QTBUG-45620 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Diffstat (limited to 'src/tools/qdoc/cppcodemarker.cpp')
-rw-r--r--src/tools/qdoc/cppcodemarker.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/tools/qdoc/cppcodemarker.cpp b/src/tools/qdoc/cppcodemarker.cpp
index 43ba29faa0..9aec902860 100644
--- a/src/tools/qdoc/cppcodemarker.cpp
+++ b/src/tools/qdoc/cppcodemarker.cpp
@@ -537,11 +537,9 @@ QList<Section> CppCodeMarker::sections(const Aggregate *inner,
isSlot = (func->metaness() == FunctionNode::Slot);
isSignal = (func->metaness() == FunctionNode::Signal);
isStatic = func->isStatic();
- if (func->associatedProperty()) {
- if (func->associatedProperty()->status() == Node::Obsolete) {
- ++c;
- continue;
- }
+ if (func->hasAssociatedProperties() && !func->hasActiveAssociatedProperty()) {
+ ++c;
+ continue;
}
}
else if ((*c)->type() == Node::Variable) {
@@ -685,7 +683,7 @@ QList<Section> CppCodeMarker::sections(const Aggregate *inner,
}
else if ((*c)->type() == Node::Function) {
FunctionNode *function = static_cast<FunctionNode *>(*c);
- if (!function->associatedProperty())
+ if (!function->hasAssociatedProperties() || !function->doc().isEmpty())
insert(memberFunctions, function, style, status);
}
++c;