diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2011-08-05 08:30:32 (GMT) |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2011-08-11 16:58:09 (GMT) |
commit | cb7cb1d3884ae8a032f3ad2ed3a6d8e3ffc06206 (patch) | |
tree | fd1739a87ce668f9d59ebf587fe990bdb4d9fe11 /src/corelib | |
parent | 50b84b716d3932e8c75c9fb4edac257c02d2c361 (diff) | |
download | Qt-cb7cb1d3884ae8a032f3ad2ed3a6d8e3ffc06206.zip Qt-cb7cb1d3884ae8a032f3ad2ed3a6d8e3ffc06206.tar.gz Qt-cb7cb1d3884ae8a032f3ad2ed3a6d8e3ffc06206.tar.bz2 |
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
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/io/qtemporaryfile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |