summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qtemporaryfile.cpp
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2023-03-08 15:44:22 +0200
committerAhmad Samir <a.samirh78@gmail.com>2023-04-08 13:23:37 +0200
commitdb797d19a3721bedc0d6b1f179e5e32621be277a (patch)
tree2a79e779756aee124f0ae5999f2280f51826f6b8 /src/corelib/io/qtemporaryfile.cpp
parent94a01cd6ec3e206f376cb0a1d1bbab1be197460d (diff)
QTemporaryFile: fix narrowing conversion warnings
- Don't use unsigned to avoid negative values (if an unsigned variable is assigned a negative value it'll wrap around and become a huge positive value, which is usually not what's required) Change-Id: I5d41280b9ca14c15727f9f2447ed50573b187931 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qtemporaryfile.cpp')
-rw-r--r--src/corelib/io/qtemporaryfile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp
index 07d8c0469d..80ea57fb92 100644
--- a/src/corelib/io/qtemporaryfile.cpp
+++ b/src/corelib/io/qtemporaryfile.cpp
@@ -45,8 +45,8 @@ QTemporaryFileName::QTemporaryFileName(const QString &templateName)
{
// Ensure there is a placeholder mask
QString qfilename = QDir::fromNativeSeparators(templateName);
- uint phPos = qfilename.size();
- uint phLength = 0;
+ qsizetype phPos = qfilename.size();
+ qsizetype phLength = 0;
while (phPos != 0) {
--phPos;