diff options
author | Martin Smith <martin.smith@qt.io> | 2017-11-13 14:37:40 +0100 |
---|---|---|
committer | Martin Smith <martin.smith@qt.io> | 2017-11-16 09:07:44 +0000 |
commit | d39f463b90d2668138b37f2fc5fdf67296c753bb (patch) | |
tree | b1602ff045787ca4bf6263498726f8e2b90b6855 /src/qdoc/clangcodeparser.cpp | |
parent | fee092c54b906fa4d06ef1f2867b6735081f8b4c (diff) | |
download | qttools-d39f463b90d2668138b37f2fc5fdf67296c753bb.tar.gz |
qdoc: Document C++ functions that are invokable
This update lets clang report to qdoc whenever Q_INVOKABLE
appears in a C++ function declaration so that qdoc can add
a note to the function's documentation telling the reader
that the function is invokable via the meta-object system
and from QML.
Task-number: QTBUG-59083
Change-Id: I9b62ba1c9159a1ec43c6a59e576efdb71bff62e5
Reviewed-by: Martin Smith <martin.smith@qt.io>
Diffstat (limited to 'src/qdoc/clangcodeparser.cpp')
-rw-r--r-- | src/qdoc/clangcodeparser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp index e6c6d5801..f50215201 100644 --- a/src/qdoc/clangcodeparser.cpp +++ b/src/qdoc/clangcodeparser.cpp @@ -782,6 +782,8 @@ void ClangVisitor::readParameterNamesAndAttributes(FunctionNode* fn, CXCursor cu } else if (annotation == QLatin1String("qt_signal")) { fn->setMetaness(FunctionNode::Signal); } + if (annotation == QLatin1String("qt_invokable")) + fn->setInvokable(true); } else if (kind == CXCursor_ParmDecl) { if (i >= pvect.count()) return CXChildVisit_Break; // Attributes comes before parameters so we can break. |