qt5base-lts/tests/auto/corelib/tools/qsharedpointer
Thiago Macieira a094bf5a89 Don't increase the reference count if dynamic_cast failed
If the dynamic_cast failed in QSharedPointer::dynamicCast or
qSharedPointerDynamicCast, we should avoid creating the QSharedPointer
that shares the weak and strong reference counts. In Qt 5, this does
not imply a leak since the original pointer is stored internally for
deletion. In Qt 4 it implies a leak under certain circumstances, which
this change fixes.

Task-number: QTBUG-28924
Change-Id: Id2de140de4cf676461e14b201ad250c53666b79d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-01-04 17:30:19 +01:00
..
.gitignore Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
externaltests.cpp tst_QSharedPointer: update application types 2012-11-26 14:16:44 +01:00
externaltests.h tst_QSharedPointer: update application types 2012-11-26 14:16:44 +01:00
externaltests.pri Fixed qsharedpointer unittest to run from installation directory 2012-02-10 03:02:07 +01:00
forwarddeclared.cpp Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
forwarddeclared.h Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
nontracked.cpp Don't increase the reference count if dynamic_cast failed 2013-01-04 17:30:19 +01:00
nontracked.h Don't increase the reference count if dynamic_cast failed 2013-01-04 17:30:19 +01:00
qsharedpointer.pro Don't increase the reference count if dynamic_cast failed 2013-01-04 17:30:19 +01:00
tst_qsharedpointer.cpp Don't increase the reference count if dynamic_cast failed 2013-01-04 17:30:19 +01:00
wrapper.cpp Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
wrapper.h Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00