From e5f295c8a458dcd336f7cf3768ca62aded69e659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Fri, 3 Mar 2023 16:52:34 +0100 Subject: 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 --- tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp') 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 { -- cgit v1.2.3