qt5base-lts/tests/auto/corelib/tools/qsharedpointer
Bradley T. Hughes 6f0f9f6928 Remove QMetaObject guards and deprecate QPointer.
QWeakPointer is superior and preferred.

Remove QMetaObject::addGuard(), QMetaObject::changeGuard(),
QMetaObject::removeGuard(), and QObjectPrivate::clearGuards().

Implement QPointer using QWeakPointer<T> instead. This changes the
behavior of QPointer in 2 ways:

- During destruction of a QWidget. Previously, the destructor of QWidget
would reset all QPointers so that they would return zero when destroying
children. Update tst_QPointer to account for this change.

- When constructing a QSharedPointer to take ownership of an object
after a QPointer is already tracking the object. Previously, the shared
pointer construction would not be affected by the QPointer, but now
that QPointer is implemented using QWeakPoiner, constructing the
QSharedPointer will cause an abort(). Fix tst_QSharedPointer by
removing the use of QPointer in the objectCast() test.

These behavior changes are documented in the QPointer class
documentation and in the changes file.

Change-Id: I92d0276219c076ece7bcb60f6e1b9120ce4f5747
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-10 16:11:48 +01:00
..
.gitignore Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
externaltests.cpp Port externaltests.cpp to QTemporaryDir 2011-12-07 18:58:43 +01:00
externaltests.h Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
externaltests.pri Remove Symbian-specific code from tests. 2011-09-29 06:41:42 +02:00
forwarddeclaration.cpp Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
forwarddeclared.cpp Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
forwarddeclared.h Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
qsharedpointer.pro Fixed installation of corelib tests 2011-12-01 09:12:52 +01:00
tst_qsharedpointer.cpp Remove QMetaObject guards and deprecate QPointer. 2011-12-10 16:11:48 +01:00
wrapper.cpp Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
wrapper.h Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00