diff options
| author | Ahmad Samir <a.samirh78@gmail.com> | 2025-10-02 21:18:24 +0300 |
|---|---|---|
| committer | Ahmad Samir <a.samirh78@gmail.com> | 2025-10-16 23:30:17 +0300 |
| commit | ca725e1465fcc6d71b25c414aa9a0f0c3faad1d5 (patch) | |
| tree | 4d918ee4b7eeb20281e78f615103c231595f784b /src/corelib/serialization/qjsonparser.cpp | |
| parent | 2a35107c12d154ae148caca291377fdd0545e60f (diff) | |
QJsonParseError: fix clang -Wshorten-64-to-32 warnings
Change it to qint64 in Qt7, as requested in code review, so as to make
it easier to extend it in the future.
Pick-to: 6.10 6.8 6.5
Change-Id: If893d719dd0457fac46fdd37ff95ce95222b1858
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/serialization/qjsonparser.cpp')
| -rw-r--r-- | src/corelib/serialization/qjsonparser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/serialization/qjsonparser.cpp b/src/corelib/serialization/qjsonparser.cpp index df266a76c79..779287adb1d 100644 --- a/src/corelib/serialization/qjsonparser.cpp +++ b/src/corelib/serialization/qjsonparser.cpp @@ -321,7 +321,9 @@ QCborValue Parser::parse(QJsonParseError *error) error: container.reset(); if (error) { - error->offset = json - head; + using OffType = decltype(error->offset); + error->offset = OffType(json - head); + Q_ASSERT(error->offset == json - head); error->error = lastError; } return QCborValue(); |
