From db797d19a3721bedc0d6b1f179e5e32621be277a Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Wed, 8 Mar 2023 15:44:22 +0200 Subject: 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 --- src/corelib/io/qtemporaryfile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/io/qtemporaryfile.cpp') 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; -- cgit v1.2.3