qt6-bb10/tests/auto/corelib/tools/qsharedpointer
Milian Wolff ba6ffd99e2 Don't increase the refcount if qobject_cast failed
Follow the dynamicCast/dynamic_pointer_cast implementation for
objectCast/object_pointer_cast since a qobject_cast can fail
just like a dynamic dast.
Also see: https://eel.is/c++draft/util.smartptr.shared.cast#6.2

See commit this commit from 2013 for more historical context:
a094bf5a89

Pick-to: 6.7 6.5
Change-Id: I9a54af55a7a1cf106cace52e9cf3bc103ae0bd42
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7a65abb50eb638de445e24c2746d7f90c1b89f06)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-05 12:29:51 +00:00
..
.gitignore
CMakeLists.txt CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
externaltests.cpp Change license for tests files 2024-02-04 09:56:42 +01:00
externaltests.h Change license for tests files 2024-02-04 09:56:42 +01:00
forwarddeclared.cpp Change license for tests files 2024-02-04 09:56:42 +01:00
forwarddeclared.h Change license for tests files 2024-02-04 09:56:42 +01:00
nontracked.cpp Change license for tests files 2024-02-04 09:56:42 +01:00
nontracked.h Change license for tests files 2024-02-04 09:56:42 +01:00
tst_qsharedpointer.cpp Don't increase the refcount if qobject_cast failed 2024-09-05 12:29:51 +00:00
wrapper.cpp Change license for tests files 2024-02-04 09:56:42 +01:00
wrapper.h Change license for tests files 2024-02-04 09:56:42 +01:00