qt6-bb10/tests/auto/network/access
Marc Mutz 20eba275d8 tst_QNetworkReply: don't leak on failure in emitErrorForAllReplies()
The old code allocated QSignalSpies on the heap and stored them in a
non-owning container, so if one of the many check macros trigger,
those objects would be leaked. Ditto QNetworkReplies. The code also
used dynamically-sized containers for statically-sized data; a common
anti-pattern.

Hold the sample QUrls in a C array instead, QSignalSpies in C arrays
of std::optional (to delay initialization) and QNetworkReplies in a C
array of std::unique_ptr with the existing QScopedPointerDeleteLater
deleter.

Pick-to: 6.7
Change-Id: I7305115af15c079abba6d45c5de8db2198ea7a6d
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-03-21 11:20:49 +01:00
..
hpack Change license for tests files 2024-02-04 09:56:42 +01:00
hsts Change license for tests files 2024-02-04 09:56:42 +01:00
http2 Handle informational HTTP replies (1xx) for HTTP/2 2024-03-01 23:57:13 +01:00
qabstractnetworkcache Change license for tests files 2024-02-04 09:56:42 +01:00
qdecompresshelper Change license for tests files 2024-02-04 09:56:42 +01:00
qhttp2connection Implement ping reply in QHttp2Connection and add test 2024-03-04 20:14:36 +01:00
qhttpheaderparser Change license for tests files 2024-02-04 09:56:42 +01:00
qhttpheaders CMake: Make a few more auto tests standalone 2024-03-14 01:14:18 +01:00
qhttpnetworkconnection Change license for tests files 2024-02-04 09:56:42 +01:00
qhttpnetworkreply Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkaccessmanager Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkcachemetadata Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkcookie Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkcookiejar Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkdiskcache Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkreply tst_QNetworkReply: don't leak on failure in emitErrorForAllReplies() 2024-03-21 11:20:49 +01:00
qnetworkrequest Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkrequestfactory CMake: Make a few more auto tests standalone 2024-03-14 01:14:18 +01:00
qrestaccessmanager CMake: Make a few more auto tests standalone 2024-03-14 01:14:18 +01:00
CMakeLists.txt Privately introduce QHttp2Connection 2024-01-17 16:05:25 +01:00