From cb7cb1d3884ae8a032f3ad2ed3a6d8e3ffc06206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Fri, 5 Aug 2011 10:30:32 +0200 Subject: Modulus of negative dividends is undefined or negative ... depending on who you ask. Since it is possible for applicationPid to return negative values this means we would introduce garbage ['()*+,-./] in the generated filenames. Reviewed-by: Denis Dzyubenko --- src/corelib/io/qtemporaryfile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp index 0855d93..5bc07cb 100644 --- a/src/corelib/io/qtemporaryfile.cpp +++ b/src/corelib/io/qtemporaryfile.cpp @@ -118,7 +118,7 @@ static int createFileFromTemplate(char *const path, char *rIter = placeholderEnd; #if defined(QT_BUILD_CORE_LIB) - qint64 pid = QCoreApplication::applicationPid(); + quint64 pid = quint64(QCoreApplication::applicationPid()); do { *--rIter = (pid % 10) + '0'; pid /= 10; -- cgit v0.12