Qt Base (Core, Gui, Widgets, Network, ...)
Go to file
Marc Mutz 573c39ff00 tst_QSplitter: fix memleak in replaceWidgetWhileHidden()
QSplitter::replaceWidget() is decumented to un-parent and return the
original widget (the one that the newWidget) replaces, so the caller
of the function is responsible for deleting it, which the test
function neglected.

Fix by storing the returned object in a unique_ptr for delayed
deletion at the exit of the function. This is the minimally-invasive
change.

Amends fb56a0f2ce.

Pick-to: 6.8 6.5
Change-Id: Ia63ebfde59b1c5ef8ddb6c3f3ab10b28d5bf6cff
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f9d9630e9e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-28 16:32:22 +00:00
.github/workflows
LICENSES Add REUSE.toml files 2024-11-05 14:36:16 +01:00
bin CMake: Don't hard-code "libexec" in qt-configure-module 2024-08-16 12:36:35 +02:00
cmake Teach syncqt to look for module headers in install path 2025-03-27 23:46:53 +00:00
coin Add QNX8.0 CI enablers 2025-03-24 18:27:25 +00:00
config.tests Add copyright holder to the SPDX line 2025-03-06 02:45:25 +00:00
dist Add REUSE.toml files 2024-11-05 14:36:16 +01:00
doc Doc: Update copyright year in the global configuration 2025-03-28 16:32:16 +00:00
examples Examples: port from QCheckBox::stateChanged to checkStateChanged 2025-03-26 15:54:15 +00:00
lib
libexec Android: fix warnings in runner script 2024-12-03 20:18:21 +00:00
mkspecs Android: bump Android target API level to 35 2025-03-06 18:43:48 +00:00
qmake QMake: Add ability to link against xcframeworks with Xcode 2025-03-16 13:33:38 +00:00
src Improve underline drawing for fonts in QPainter 2025-03-28 16:32:22 +00:00
tests tst_QSplitter: fix memleak in replaceWidgetWhileHidden() 2025-03-28 16:32:22 +00:00
util qtwasmserver to serve assets from the provided path parameter 2025-03-10 07:52:41 +00:00
.cmake.conf CMake: Increase minimum required CMake version to 3.22 2024-12-02 16:01:44 +01:00
.gitattributes
.gitignore Git ignore Visual Studio CMake build directories 2023-11-24 23:42:05 +01:00
.gitreview Add .gitreview file 2025-03-25 08:40:27 +00:00
.lgtm.yml
.tag
CMakeLists.txt cmake: add _extra_files IDE target from heuristics 2024-04-12 08:36:01 +08:00
REUSE.toml Update licensing of files with infrastructure type 2025-03-12 15:16:35 +00:00
config_help.txt Introduce emoji-segmenter to 3rdparty code 2024-11-18 15:52:13 +01:00
configure Do not assume FHS in scripts 2024-06-25 11:44:00 +02:00
configure.bat configure.bat: Use call when calling the helper cmake scripts 2025-01-30 21:18:49 +00:00
configure.cmake Add `_qt_internal_set_source_file_generated` function 2025-02-17 16:13:53 +00:00
dependencies.yaml
licenseRule.json Update licensing of files with infrastructure type 2025-03-12 15:16:35 +00:00
qt_cmdline.cmake configure: Fix the -sbomdir argument 2025-02-21 10:52:15 +00:00