diff options
author | Martin Smith <martin.smith@digia.com> | 2013-05-07 09:46:35 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-08 12:01:29 +0200 |
commit | 031776378153703635524a6f14dbd6aaa3374224 (patch) | |
tree | 356d2bc572d1dc5b253d8b0183d59331ee1ca5fe /src/tools/qdoc | |
parent | 843b7f1a1705e2f1b207eb4958be87d570ac7a5f (diff) |
qdoc: Documentation for QMetaObject::Connection now appears
qdoc's faux C++ parser did not recognize class declarations
of the form:
class Name1::Name2 {
...
};
...where class Name2 is nested in class Name1. Now it does,
but this fix doesn't handle deeper nestings. doc needs a
proper C++ parser.
Task-number: QTBUG-28664
Change-Id: I5adf88cc1b2ce03f5565250734416bf9592914b5
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/tools/qdoc')
-rw-r--r-- | src/tools/qdoc/cppcodeparser.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp index 68edb1336a..41fe2f775c 100644 --- a/src/tools/qdoc/cppcodeparser.cpp +++ b/src/tools/qdoc/cppcodeparser.cpp @@ -1598,7 +1598,11 @@ bool CppCodeParser::matchBaseList(ClassNode *classe, bool isClass) } /*! - Parse a C++ class, union, or struct declarion. + Parse a C++ class, union, or struct declaration. + + This function only handles one level of class nesting, but that is + sufficient for Qt because there are no cases of class nesting more + than one level deep. */ bool CppCodeParser::matchClassDecl(InnerNode *parent, const QString &templateStuff) @@ -1612,6 +1616,18 @@ bool CppCodeParser::matchClassDecl(InnerNode *parent, return false; while (tok == Tok_Ident) readToken(); + if (tok == Tok_Gulbrandsen) { + Node* n = parent->findChildNodeByNameAndType(previousLexeme(),Node::Class); + if (n) { + parent = static_cast<InnerNode*>(n); + if (parent) { + readToken(); + if (tok != Tok_Ident) + return false; + readToken(); + } + } + } if (tok != Tok_Colon && tok != Tok_LeftBrace) return false; |