aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlcachegen/qmlcachegen.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-05-23 14:57:09 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-06-14 19:08:51 +0200
commitd4d197d06279f9257647628f7e1ccc9ec763a6bb (patch)
treefb2a69b85cb1d7aee173267062421058d5e9d57c /tools/qmlcachegen/qmlcachegen.cpp
parent67191c2b3213259c6eaf045154e9370faa085868 (diff)
Simplify errors and diagnostics
We only need two classes to describe all possible diagnostics: * A low-level private POD DiagnosticMessage. This is easily copied and passed around internally. It doesn't need to adhere to a stable API and it doesn't carry any extra baggage. * The high-level public QQmlError with its stable interface. This can internally also use a DiagnosticMessage as storage. Change-Id: I52be88d9b5d9855a661b8032b01eedb43a0fb0b3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tools/qmlcachegen/qmlcachegen.cpp')
-rw-r--r--tools/qmlcachegen/qmlcachegen.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/qmlcachegen/qmlcachegen.cpp b/tools/qmlcachegen/qmlcachegen.cpp
index 7b4135e1f8..ff6ba17612 100644
--- a/tools/qmlcachegen/qmlcachegen.cpp
+++ b/tools/qmlcachegen/qmlcachegen.cpp
@@ -82,9 +82,9 @@ Error Error::augment(const QString &contextErrorMessage) const
QString diagnosticErrorMessage(const QString &fileName, const QQmlJS::DiagnosticMessage &m)
{
QString message;
- message = fileName + QLatin1Char(':') + QString::number(m.loc.startLine) + QLatin1Char(':');
- if (m.loc.startColumn > 0)
- message += QString::number(m.loc.startColumn) + QLatin1Char(':');
+ message = fileName + QLatin1Char(':') + QString::number(m.line) + QLatin1Char(':');
+ if (m.column > 0)
+ message += QString::number(m.column) + QLatin1Char(':');
if (m.isError())
message += QLatin1String(" error: ");