diff options
| author | Martin Smith <martin.smith@digia.com> | 2015-06-30 12:40:44 +0200 |
|---|---|---|
| committer | Martin Smith <martin.smith@digia.com> | 2015-07-07 12:59:00 +0000 |
| commit | 68dec6461ec700e871f28c8672be1f28740910e5 (patch) | |
| tree | 4a81c459b23b41ba2e6115a6e0804b0b5e1142d4 /src/tools/qdoc/cppcodeparser.h | |
| parent | 6384c4e94041e588d1defbfd3b4dbbe2f611715c (diff) | |
qdoc: Parsing of inline friends
Some functions in qstring.h are marked with both friend and inline,
and qdoc ignores them when it sees the friend keyword. Then, when qdoc
finds the documentation for the functions in the cpp file, it reports
an error that it can't associate the documentation with anything it
saw in a .h file.
This update corrects that problem. It also improves qdoc's parsing of
other inline functions in other files.
Change-Id: If94e403809af3ee3238eac0f2861b027197d6d3c
Task-number: QTBUG-46531
Reviewed-by: Martin Smith <martin.smith@digia.com>
Diffstat (limited to 'src/tools/qdoc/cppcodeparser.h')
| -rw-r--r-- | src/tools/qdoc/cppcodeparser.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/tools/qdoc/cppcodeparser.h b/src/tools/qdoc/cppcodeparser.h index 31964699a20..4fb428fc725 100644 --- a/src/tools/qdoc/cppcodeparser.h +++ b/src/tools/qdoc/cppcodeparser.h @@ -51,6 +51,15 @@ class CppCodeParser : public CodeParser { Q_DECLARE_TR_FUNCTIONS(QDoc::CppCodeParser) + struct ParsedParameter { + bool qPrivateSignal_; + QString dataType_; + QString name_; + QString defaultValue_; + ParsedParameter() : qPrivateSignal_(false) { } + }; + typedef QList<ParsedParameter> ParsedParameterList; + struct ExtraFuncData { Aggregate* root; // Used as the parent. Node::NodeType type; // The node type: Function, etc. @@ -116,7 +125,7 @@ protected: bool matchTemplateAngles(CodeChunk *type = 0); bool matchTemplateHeader(); bool matchDataType(CodeChunk *type, QString *var = 0); - bool matchParameter(FunctionNode *func); + bool matchParameter(ParsedParameterList& pplist); bool matchFunctionDecl(Aggregate *parent, QStringList *parentPathPtr, FunctionNode **funcPtr, @@ -149,6 +158,7 @@ protected: const QString &includeFile, const QString ¯oDef); void createExampleFileNodes(DocumentNode *dn); + int matchFunctionModifier(); protected: QMap<QString, Node::NodeType> nodeTypeMap; |
