diff options
author | Martin Smith <martin.smith@theqtcompany.com> | 2016-02-17 14:41:47 +0100 |
---|---|---|
committer | Martin Smith <martin.smith@theqtcompany.com> | 2016-02-22 09:30:45 +0000 |
commit | 1381b25560127fa08c91f6d8ff99ed104a907b82 (patch) | |
tree | cd9c413696814fddc85970bf44ea4899fc6bcf64 /src/qdoc/cppcodeparser.cpp | |
parent | 98eebb2dc1830b262d72e748817aee25e54d0d35 (diff) | |
download | qttools-1381b25560127fa08c91f6d8ff99ed104a907b82.tar.gz |
qdoc: QML basic types can now have methods
\qmlmethod now works for QML basic types. Use it the same
way it is used for QML types. \qmlsignal should work now
too, but I only tested this for methods. There is now not
much difference between QML types and basic types.
Change-Id: Ie7dfb01dd2ff0b68944b864ebe29d4a95ba7d550
Task-number: QTBUG-51125
Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com>
Diffstat (limited to 'src/qdoc/cppcodeparser.cpp')
-rw-r--r-- | src/qdoc/cppcodeparser.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp index 03b74b83e..29f6a07d4 100644 --- a/src/qdoc/cppcodeparser.cpp +++ b/src/qdoc/cppcodeparser.cpp @@ -556,11 +556,13 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc, (command == COMMAND_JSATTACHEDSIGNAL) || (command == COMMAND_JSATTACHEDMETHOD)) { QString module; - QString qmlTypeName; + QString name; QString type; - if (splitQmlMethodArg(arg.first, type, module, qmlTypeName)) { - QmlTypeNode* qmlType = qdb_->findQmlType(module, qmlTypeName); - if (qmlType) { + if (splitQmlMethodArg(arg.first, type, module, name)) { + Aggregate* aggregate = qdb_->findQmlType(module, name); + if (!aggregate) + aggregate = qdb_->findQmlBasicType(module, name); + if (aggregate) { bool attached = false; Node::NodeType nodeType = Node::QmlMethod; if ((command == COMMAND_QMLSIGNAL) || @@ -582,7 +584,7 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc, return 0; // never get here. FunctionNode* fn = makeFunctionNode(doc, arg.first, - qmlType, + aggregate, nodeType, attached, command); |