diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-05-17 13:43:00 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-05-18 13:12:45 +0000 |
commit | df1a619d65d8e5db91f3c8db46b00872b461e334 (patch) | |
tree | 3c36fe602b70c88cb3401d2470b79728ad337dde /sources/shiboken2/ApiExtractor/docparser.cpp | |
parent | 6989d6040fb58d62ba4a56983d41d7b065ad4a18 (diff) |
Documentation: Improve function documentation extraction
The XQuery used to obtain the function description can fail due to
argument type mismatches (typedefs or blank formatting).
In that case, repeat the query restricting the search
the argument count. If exactly one match is found, use that
with a warning. Output the matches otherwise.
Split out functions for the function queries and and helper
function for creating the XQuery with flags.
Task-number: PYSIDE-363
Change-Id: I83aaa53511896ee78a25f39a769ca907d0ac10bb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/docparser.cpp')
-rw-r--r-- | sources/shiboken2/ApiExtractor/docparser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sources/shiboken2/ApiExtractor/docparser.cpp b/sources/shiboken2/ApiExtractor/docparser.cpp index d59411fe6..9305332ba 100644 --- a/sources/shiboken2/ApiExtractor/docparser.cpp +++ b/sources/shiboken2/ApiExtractor/docparser.cpp @@ -125,9 +125,9 @@ QString DocParser::msgCannotFindDocumentation(const QString &fileName, const AbstractMetaFunction *function, const QString &query) { - return msgCannotFindDocumentation(fileName, "function", - metaClass->name() + QLatin1String("::") + function->name() + QLatin1String("()"), - query); + const QString name = metaClass->name() + QLatin1String("::") + + function->minimalSignature(); + return msgCannotFindDocumentation(fileName, "function", name, query); } QString DocParser::msgCannotFindDocumentation(const QString &fileName, |