diff options
author | Ahmad Samir <a.samirh78@gmail.com> | 2023-03-08 13:06:21 +0200 |
---|---|---|
committer | Ahmad Samir <a.samirh78@gmail.com> | 2023-03-11 12:39:47 +0200 |
commit | 8a1eb24de8ef063fc5d0c3f10a7324d95bbc8709 (patch) | |
tree | 07391a052751cc89f2993bb051a425b59482c0b0 /src/corelib/global/qlibraryinfo.cpp | |
parent | dda60cf0d1c70f186845e5bfd08dca1cd5e98a93 (diff) |
Misc: Fix qsizetype-related narrowing coversions
Task-number: QTBUG-102461
Change-Id: I96757abc50fc45756bc1271a970f819a48021663
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qlibraryinfo.cpp')
-rw-r--r-- | src/corelib/global/qlibraryinfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 715bda488c..68db820f01 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -542,8 +542,8 @@ QString QLibraryInfoPrivate::path(QLibraryInfo::LibraryPath p, UsageMode usageMo ret = v.toString(); } - int startIndex = 0; - forever { + qsizetype startIndex = 0; + while (true) { startIndex = ret.indexOf(u'$', startIndex); if (startIndex < 0) break; @@ -553,7 +553,7 @@ QString QLibraryInfoPrivate::path(QLibraryInfo::LibraryPath p, UsageMode usageMo startIndex++; continue; } - int endIndex = ret.indexOf(u')', startIndex + 2); + qsizetype endIndex = ret.indexOf(u')', startIndex + 2); if (endIndex < 0) break; auto envVarName = QStringView{ret}.mid(startIndex + 2, endIndex - startIndex - 2); |