diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2023-03-03 16:52:34 +0100 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2023-03-09 16:24:45 +0100 |
commit | e5f295c8a458dcd336f7cf3768ca62aded69e659 (patch) | |
tree | 10a645b4df2c4d3bd0d59bf577bc5e9a2eb85f0c /tests/auto/network/access/qnetworkdiskcache | |
parent | 4201cdab1886b5c39fe722a95e1b0ba462b63b71 (diff) |
QNetworkDiskCache: use QSaveFile
QTemporaryFile is not designed to promote temporary files
to non-temporary files. So, it, quite importantly, does not
care if the content of the files are flushed to disk before
renaming it into its 'final' destination. This is what
QSaveFile is for.
This was much more time-consuming than intended since I had to debug
this quirk about calling size().
Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-111397
Change-Id: I15b300f6a5748ad3a0be983545ea621269a12ecd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/network/access/qnetworkdiskcache')
-rw-r--r-- | tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp index 64a569e9fa..f4458ee235 100644 --- a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp +++ b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp @@ -12,7 +12,7 @@ #define EXAMPLE_URL "http://user:pass@localhost:4/#foo" #define EXAMPLE_URL2 "http://user:pass@localhost:4/bar" //cached objects are organized into these many subdirs -#define NUM_SUBDIRECTORIES 16 +#define NUM_SUBDIRECTORIES 15 class tst_QNetworkDiskCache : public QObject { |