diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-06-28 21:45:28 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2017-08-04 17:30:01 +0000 |
commit | 3981a1f440914e8108af3d854a1b01dd596a8a0e (patch) | |
tree | 1d730fcef9d73253c1a7e18019d44612421cabf2 /tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp | |
parent | 376626560237c263c79103930590eafa4d4dd8d0 (diff) |
QTemporaryFile: split the template parsing and generation
This makes the code more reusable by the unnamed file feature.
This commit removes the backwards compatibility in using sequential file
names if the first one failed. Since 5483b30868e44bc0799d7a1998f1907775,
there are at least three random characters, so the chance of collision
is 1 in 52³ = 140608.
That commit also did not take a system failure into account. If we ended
up getting EEXIST for all attempts, we'd attempt on average 26³*53³ file
creations. For that reason, I've added an upper limit in the number of
attempts to create a file.
Change-Id: I1eba2b016de74620bfc8fffd14cc7e31c6e50558
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp')
0 files changed, 0 insertions, 0 deletions