summaryrefslogtreecommitdiff
path: root/src/qdoc/cppcodeparser.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@theqtcompany.com>2016-02-26 15:51:04 +0100
committerMartin Smith <martin.smith@theqtcompany.com>2016-03-09 11:34:29 +0000
commit450c566d72959016f1fd3cefd5c7ff08eea69fc7 (patch)
treedeb3275f547bb3e6b2d90a096571493cdaaf2ff3 /src/qdoc/cppcodeparser.cpp
parent2b262fad86ef38a5fa692b4c73e6ec26a5d45a5f (diff)
downloadqttools-450c566d72959016f1fd3cefd5c7ff08eea69fc7.tar.gz
qdoc: Allows properties in QML basic types
qdoc now accepts \qmlproperty comments for QML basic types. I didn't test it, but I think most of what was required was added in QTBUG-51125. Change-Id: I81fa6fa75e73f9ac2fab4794191c37730a4e7561 Task-number: QTBUG-40428 Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com>
Diffstat (limited to 'src/qdoc/cppcodeparser.cpp')
-rw-r--r--src/qdoc/cppcodeparser.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp
index 0ea135cce..e4e423982 100644
--- a/src/qdoc/cppcodeparser.cpp
+++ b/src/qdoc/cppcodeparser.cpp
@@ -813,9 +813,11 @@ void CppCodeParser::processQmlProperties(const Doc& doc,
bool attached = ((topic == COMMAND_QMLATTACHEDPROPERTY) ||
(topic == COMMAND_JSATTACHEDPROPERTY));
if (splitQmlPropertyArg(arg, type, module, qmlTypeName, property)) {
- qmlType = qdb_->findQmlType(module, qmlTypeName);
- if (qmlType) {
- if (qmlType->hasQmlProperty(property, attached) != 0) {
+ Aggregate* aggregate = qdb_->findQmlType(module, qmlTypeName);
+ if (!aggregate)
+ aggregate = qdb_->findQmlBasicType(module, qmlTypeName);
+ if (aggregate) {
+ if (aggregate->hasQmlProperty(property, attached) != 0) {
QString msg = tr("QML property documented multiple times: '%1'").arg(arg);
doc.startLocation().warning(msg);
}
@@ -826,7 +828,7 @@ void CppCodeParser::processQmlProperties(const Doc& doc,
qpn->setGenus(Node::JS);
}
else {
- qpn = new QmlPropertyNode(qmlType, property, type, attached);
+ qpn = new QmlPropertyNode(aggregate, property, type, attached);
qpn->setLocation(doc.startLocation());
if (jsProps)
qpn->setGenus(Node::JS);