diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-01-05 10:36:45 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-01-17 10:04:04 +0100 |
commit | c0f49929ad2c67eb6f8deb3976aeef6fb1e6e5ab (patch) | |
tree | b826278cd638b5621442a50d40fa6b63e361dc84 /src | |
parent | 9443f1e00d0189bf19ea83f37d25ee37ca6c40ac (diff) |
Fix some qsizetype vs. quint32 problems
On 32bit platforms you cannot losslessly convert quint32 to qsizetype.
However, in the places we are facing here, we are only interested in
signed 32bit numbers anyway.
Change-Id: I93a07c2847bd5bfae426dccbb6c0e33c5758442d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 4e1fe071ff05b92ed12fdf59a2185e1254b411cf)
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qmlcompiler/qqmljslogger_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qmlcompiler/qqmljslogger_p.h b/src/qmlcompiler/qqmljslogger_p.h index 0069c34bbd..596f7b4f33 100644 --- a/src/qmlcompiler/qqmljslogger_p.h +++ b/src/qmlcompiler/qqmljslogger_p.h @@ -63,7 +63,7 @@ public: \param location: The location where an error occurred. */ IssueLocationWithContext(QStringView code, const QQmlJS::SourceLocation &location) { - int before = qMax(0,code.lastIndexOf(QLatin1Char('\n'), location.offset)); + quint32 before = qMax(0, code.lastIndexOf(QLatin1Char('\n'), location.offset)); if (before != 0) before++; |