From a9b0e47ab53177887eed8594b456fe0f178f0f43 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 12 Jul 2018 14:49:13 +0200 Subject: 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 --- sources/shiboken2/ApiExtractor/typesystem.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'sources/shiboken2/ApiExtractor/typesystem.cpp') diff --git a/sources/shiboken2/ApiExtractor/typesystem.cpp b/sources/shiboken2/ApiExtractor/typesystem.cpp index baaec6d30..f316de80a 100644 --- a/sources/shiboken2/ApiExtractor/typesystem.cpp +++ b/sources/shiboken2/ApiExtractor/typesystem.cpp @@ -210,11 +210,6 @@ static QString msgReaderError(const QXmlStreamReader &reader, const QString &wha return message; } -static QString msgReaderError(const QXmlStreamReader &reader) -{ - return msgReaderError(reader, reader.errorString()); -} - static QString msgInvalidVersion(const QStringRef &version, const QString &package = QString()) { QString result; @@ -238,7 +233,7 @@ bool Handler::parse(QXmlStreamReader &reader) switch (reader.readNext()) { case QXmlStreamReader::NoToken: case QXmlStreamReader::Invalid: - qCWarning(lcShiboken).noquote().nospace() << msgReaderError(reader); + m_error = msgReaderError(reader, reader.errorString()); return false; case QXmlStreamReader::StartElement: if (!startElement(reader.name(), reader.attributes())) { -- cgit v1.2.3