aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/doxygenparser.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-04-26 08:00:43 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-04-26 08:00:48 +0200
commit00394c4773c89922e8ceef50155bc56323cf16b0 (patch)
treec26273428612712c59c257fd9545fd16428735c0 /sources/shiboken2/ApiExtractor/doxygenparser.cpp
parentdc4ad7f211db52d614426c4f2b7b808c6200ae85 (diff)
parent1beda098a4ce3128b1669b66230dbfa3c3c1a821 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Diffstat (limited to 'sources/shiboken2/ApiExtractor/doxygenparser.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/doxygenparser.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/sources/shiboken2/ApiExtractor/doxygenparser.cpp b/sources/shiboken2/ApiExtractor/doxygenparser.cpp
index e238aa1f7..94c9ec7e0 100644
--- a/sources/shiboken2/ApiExtractor/doxygenparser.cpp
+++ b/sources/shiboken2/ApiExtractor/doxygenparser.cpp
@@ -31,8 +31,8 @@
#include "messages.h"
#include "reporthandler.h"
#include "typesystem.h"
+#include "xmlutils.h"
-#include <QtXmlPatterns/QXmlQuery>
#include <QtCore/QFile>
#include <QtCore/QDir>
@@ -86,8 +86,13 @@ void DoxygenParser::fillDocumentation(AbstractMetaClass* metaClass)
<< "/{struct|class|namespace}"<< doxyFileSuffix;
return;
}
- QXmlQuery xquery;
- xquery.setFocus(QUrl(doxyFilePath));
+
+ QString errorMessage;
+ XQueryPtr xquery = XQuery::create(doxyFilePath, &errorMessage);
+ if (xquery.isNull()) {
+ qCWarning(lcShiboken, "%s", qPrintable(errorMessage));
+ return;
+ }
// Get class documentation
const QString classQuery = QLatin1String("/doxygen/compounddef/detaileddescription");
@@ -190,8 +195,12 @@ Documentation DoxygenParser::retrieveModuleDocumentation(const QString& name){
return Documentation();
}
- QXmlQuery xquery;
- xquery.setFocus(QUrl(sourceFile));
+ QString errorMessage;
+ XQueryPtr xquery = XQuery::create(sourceFile, &errorMessage);
+ if (xquery.isNull()) {
+ qCWarning(lcShiboken, "%s", qPrintable(errorMessage));
+ return {};
+ }
// Module documentation
QString query = QLatin1String("/doxygen/compounddef/detaileddescription");