summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetaobject.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2024-03-19 18:31:28 +0100
committerMarc Mutz <marc.mutz@qt.io>2024-03-21 11:20:49 +0100
commit20eba275d836e071c1ad8a5e4d1ef88fc5b23fca (patch)
tree9fd599dda4f9466aa72950b49d3e3bb02899fe49 /src/corelib/kernel/qmetaobject.cpp
parentc07a47cbf0972578f066f0085eb857dba210aae1 (diff)
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>
Diffstat (limited to 'src/corelib/kernel/qmetaobject.cpp')
0 files changed, 0 insertions, 0 deletions