diff options
author | Sami Shalayel <[email protected]> | 2024-09-16 11:53:17 +0200 |
---|---|---|
committer | Sami Shalayel <[email protected]> | 2024-10-09 10:37:59 +0200 |
commit | b14891e3d29e7c19717aaa77bb63aad94e358f4d (patch) | |
tree | 37fda484caed1cc328fc9a0b7f4cb8a23e969726 /src/qmlcompiler/qqmlsasourcelocation.cpp | |
parent | 4baa3b7c5b5f6a2e89f701651e6240e2a17cc38b (diff) |
SourceLocation: make begin() and end() qsizetype
Change begin() and end() to return a qsizetype, as now we only process
QML files where quint32 can safely be casted to qsizetype.
This allows to change all users of begin() and end() to use qsizetype,
and to silence all MSVC compile warnings about comparison of ints with
different signedness.
Fixes: QTBUG-127833
Change-Id: I251435aa598386effe0259549dbe94d17b0d806b
Reviewed-by: Olivier De Cannière <[email protected]>
Diffstat (limited to 'src/qmlcompiler/qqmlsasourcelocation.cpp')
-rw-r--r-- | src/qmlcompiler/qqmlsasourcelocation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qmlcompiler/qqmlsasourcelocation.cpp b/src/qmlcompiler/qqmlsasourcelocation.cpp index 63b61cce5b..bc22d1b93a 100644 --- a/src/qmlcompiler/qqmlsasourcelocation.cpp +++ b/src/qmlcompiler/qqmlsasourcelocation.cpp @@ -38,7 +38,7 @@ bool QQmlSA::SourceLocation::isValid() const */ quint32 QQmlSA::SourceLocation::begin() const { - return QQmlSA::SourceLocationPrivate::sourceLocation(*this).begin(); + return offset(); } /*! @@ -46,7 +46,7 @@ quint32 QQmlSA::SourceLocation::begin() const */ quint32 QQmlSA::SourceLocation::end() const { - return QQmlSA::SourceLocationPrivate::sourceLocation(*this).end(); + return offset() + length(); } /*! |