summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qsavefile.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-07-19 13:20:15 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-08-04 17:30:10 +0000
commit9a3ce25f983b7ef842bbc055081474f044efb738 (patch)
tree43ce12868eb01eb3e4b6b71917ef376bf2705af3 /src/corelib/io/qsavefile.cpp
parenta06fb55dcb0820e078588c6a6d96c74b712dd380 (diff)
QTemporaryFileName: use the random data more wisely
First, instead of getting 32 bits of random for every character, we can get reasonable randomness with just 10 bits, so we can replace 3 characters per get32() call. A typical template with six X will only need 64 bits of random data. Second, using the PID is not random at all. The reason why mktemp used to use it is irrelevant (probably because applications failed to seed rand()). Either way, we don't need nor want the PID anymore. And because the code is completely rewritten, the UCB copyright no longer applies. Change-Id: I84e45059a888497fb55ffffd14d2d4cfe159abca Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qsavefile.cpp')
0 files changed, 0 insertions, 0 deletions