From df1a619d65d8e5db91f3c8db46b00872b461e334 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 17 May 2018 13:43:00 +0200 Subject: 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 --- sources/shiboken2/ApiExtractor/qtdocparser.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sources/shiboken2/ApiExtractor/qtdocparser.h') diff --git a/sources/shiboken2/ApiExtractor/qtdocparser.h b/sources/shiboken2/ApiExtractor/qtdocparser.h index 3ea0122b4..b5f0e51d8 100644 --- a/sources/shiboken2/ApiExtractor/qtdocparser.h +++ b/sources/shiboken2/ApiExtractor/qtdocparser.h @@ -38,6 +38,15 @@ public: void fillDocumentation(AbstractMetaClass* metaClass) override; Documentation retrieveModuleDocumentation() override; Documentation retrieveModuleDocumentation(const QString& name) override; + +private: + QString queryFunctionDocumentation(const QString &sourceFileName, + const AbstractMetaClass* metaClass, + const QString &classQuery, + const AbstractMetaFunction *func, + const DocModificationList &signedModifs, + QXmlQuery &xquery, + QString *errorMessage); }; #endif // QTDOCPARSER_H -- cgit v1.2.3