aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/typedatabase.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-12 14:49:13 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-12 19:45:08 +0000
commita9b0e47ab53177887eed8594b456fe0f178f0f43 (patch)
tree3c76ebcf40f1775c49acc7e0fb729635cdb7e38c /sources/shiboken2/ApiExtractor/typedatabase.cpp
parent612bfd01e1e7698cb3a06d619cc7d7c7acd3d273 (diff)
shiboken: Do not swallow XML parsing errors
Handler::parseFile() had some returns where the errors would be lost. Add accessor for the errorString() to the Handler and output in the calling function. Task-number: PYSIDE-743 Change-Id: I42d2b88478e8ebfac7f590c2086046116e2add74 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/typedatabase.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/typedatabase.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/sources/shiboken2/ApiExtractor/typedatabase.cpp b/sources/shiboken2/ApiExtractor/typedatabase.cpp
index 9529de40a..e494ba174 100644
--- a/sources/shiboken2/ApiExtractor/typedatabase.cpp
+++ b/sources/shiboken2/ApiExtractor/typedatabase.cpp
@@ -518,7 +518,10 @@ bool TypeDatabase::parseFile(QIODevice* device, bool generate)
{
QXmlStreamReader reader(device);
Handler handler(this, generate);
- return handler.parse(reader);
+ const bool result = handler.parse(reader);
+ if (!result)
+ qCWarning(lcShiboken, "%s", qPrintable(handler.errorString()));
+ return result;
}
PrimitiveTypeEntry *TypeDatabase::findPrimitiveType(const QString& name) const