From 499115fd94a454296353231ff874c896ba627039 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 13 Jan 2020 17:39:08 +0100 Subject: [PATCH] QtSupport/Example list parser: Improve error message Output line, column and message. Change-Id: I1fa0b3da6b20b27ce3e2f66442751ab31e21904b Reviewed-by: Eike Ziller --- src/plugins/qtsupport/exampleslistmodel.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp index 5f1c79bbb87..af27807cc03 100644 --- a/src/plugins/qtsupport/exampleslistmodel.cpp +++ b/src/plugins/qtsupport/exampleslistmodel.cpp @@ -488,8 +488,11 @@ void ExamplesListModel::updateExamples() break; } - if (reader.hasError() && debugExamples()) - qWarning() << QString::fromLatin1("ERROR: Could not parse file as XML document (%1)").arg(exampleSource); + if (reader.hasError() && debugExamples()) { + qWarning().noquote().nospace() << "ERROR: Could not parse file as XML document (" + << exampleSource << "):" << reader.lineNumber() << ':' << reader.columnNumber() + << ": " << reader.errorString(); + } } endResetModel(); }