diff options
author | Martin Smith <martin.smith@qt.io> | 2017-09-12 10:42:10 +0200 |
---|---|---|
committer | Martin Smith <martin.smith@qt.io> | 2017-09-18 12:37:42 +0000 |
commit | e86884bc7ae0ba94780dcedb61270ffb0d457f13 (patch) | |
tree | 6d47e6b8e11254896b9cf8d285f90ab55b1fb0c8 /src/qdoc/clangcodeparser.cpp | |
parent | cceda3d0bc93996afb26cd569255b041765f4d5b (diff) | |
download | qttools-e86884bc7ae0ba94780dcedb61270ffb0d457f13.tar.gz |
qdoc: QPrivateSignal was not handled correctly
Now that clang-qdoc uses clang to parse the \fn commands,
it must handle the QPrivateSignal flag correctly. It is not
allowed in the signature in the \fn command. This update
corrects a bug where the expected number or parameters was
being reduced by 1 because the flag appeared in the declaration
in the include file.
Change-Id: I1c974100b2017b3058040937a03500a75dc69d82
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/qdoc/clangcodeparser.cpp')
-rw-r--r-- | src/qdoc/clangcodeparser.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp index b6947c74f..7216b1604 100644 --- a/src/qdoc/clangcodeparser.cpp +++ b/src/qdoc/clangcodeparser.cpp @@ -275,15 +275,14 @@ static Node *findFunctionNodeForCursor(QDocDatabase* qdb, CXCursor cur) { continue; auto fn = static_cast<FunctionNode*>(candidate); const auto &funcParams = fn->parameters(); - const int actualArg = numArg - fn->isPrivateSignal(); - if (funcParams.count() != (actualArg + isVariadic)) + if (funcParams.count() != (numArg + isVariadic)) continue; if (fn->isConst() != bool(clang_CXXMethod_isConst(cur))) continue; if (isVariadic && funcParams.last().dataType() != QLatin1String("...")) continue; bool different = false; - for (int i = 0; i < actualArg; i++) { + for (int i = 0; i < numArg; i++) { if (args.size() <= i) args.append(fromCXString(clang_getTypeSpelling(clang_getArgType(funcType, i)))); QString t1 = funcParams.at(i).dataType(); |