aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlexpression.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 /src/qml/qml/qqmlexpression.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 'src/qml/qml/qqmlexpression.cpp')
-rw-r--r--src/qml/qml/qqmlexpression.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlexpression.cpp b/src/qml/qml/qqmlexpression.cpp
index 6a11583f18..be0adc54a7 100644
--- a/src/qml/qml/qqmlexpression.cpp
+++ b/src/qml/qml/qqmlexpression.cpp
@@ -351,7 +351,7 @@ QString QQmlExpression::sourceFile() const
int QQmlExpression::lineNumber() const
{
Q_D(const QQmlExpression);
- return qmlSourceCoordinate(d->line);
+ return qmlConvertSourceCoordinate<quint16, int>(d->line);
}
/*!
@@ -361,7 +361,7 @@ int QQmlExpression::lineNumber() const
int QQmlExpression::columnNumber() const
{
Q_D(const QQmlExpression);
- return qmlSourceCoordinate(d->column);
+ return qmlConvertSourceCoordinate<quint16, int>(d->column);
}
/*!
@@ -372,8 +372,8 @@ void QQmlExpression::setSourceLocation(const QString &url, int line, int column)
{
Q_D(QQmlExpression);
d->url = url;
- d->line = qmlSourceCoordinate(line);
- d->column = qmlSourceCoordinate(column);
+ d->line = qmlConvertSourceCoordinate<int, quint16>(line);
+ d->column = qmlConvertSourceCoordinate<int, quint16>(column);
}
/*!