summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2011-08-05 10:30:32 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-20 04:23:33 +0200
commit74276637d9ad3ee67440c37f8c26853cc6f51bc9 (patch)
tree3e244625962b03ad959b9a758f70be55bb0c4680 /src/corelib
parentdf1c1d28de181b086c4333b227aaf14ee1eb72ad (diff)
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 (cherry picked from commit cb7cb1d3884ae8a032f3ad2ed3a6d8e3ffc06206) Change-Id: Ie4f74b961397f97508ea67a0c835e45773d1cc0e Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qtemporaryfile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp
index ad7d7e6e0f..d9b1143611 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;