From dc90b2c0c48eeddfc4508d41e0197e8b30b9f9e5 Mon Sep 17 00:00:00 2001 From: Karsten Heimrich Date: Mon, 8 Feb 2016 14:39:17 +0100 Subject: qdoc: Implement support for C++11 default/delete declarations. Task-number: QTBUG-50870 Change-Id: I8ce46e41e880ece93c9e6e09f2e01f1047de1622 Reviewed-by: Martin Smith --- src/qdoc/cppcodeparser.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/qdoc/cppcodeparser.cpp') diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp index 7d9838a79..da389d71c 100644 --- a/src/qdoc/cppcodeparser.cpp +++ b/src/qdoc/cppcodeparser.cpp @@ -1571,10 +1571,16 @@ bool CppCodeParser::matchFunctionDecl(Aggregate *parent, // look for const bool matchedConst = match(Tok_const); - // look for 0 indicating pure virtual - if (match(Tok_Equal) && match(Tok_Number)) - virtuality = FunctionNode::PureVirtual; - + bool isDeleted = false; + bool isDefaulted = false; + if (match(Tok_Equal)) { + if (match(Tok_Number)) // look for 0 indicating pure virtual + virtuality = FunctionNode::PureVirtual; + else if (match(Tok_delete)) + isDeleted = true; + else if (match(Tok_default)) + isDefaulted = true; + } // look for colon indicating ctors which must be skipped if (match(Tok_Colon)) { while (tok != Tok_LeftBrace && tok != Tok_Eoi) @@ -1644,6 +1650,8 @@ bool CppCodeParser::matchFunctionDecl(Aggregate *parent, func->setStatic(matched_static); func->setConst(matchedConst); func->setVirtualness(virtuality); + func->setIsDeleted(isDeleted); + func->setIsDefaulted(isDefaulted); if (isQPrivateSignal) func->setPrivateSignal(); if (!pvect.isEmpty()) { -- cgit v1.2.1