Make it possible to put QObject tracked with QWeakPointer inside QSharedPointer
authorOlivier Goffart <ogoffart@woboq.com>
Fri, 23 Dec 2011 16:13:05 +0000 (17:13 +0100)
committerQt by Nokia <qt-info@nokia.com>
Fri, 10 Feb 2012 14:37:10 +0000 (15:37 +0100)
commit497622cafe235eadb5dd5056b196d8451ee89071
treee7a561f55bb26c137f5d6794c393e355f957a326
parent281673e5d3e25f543590bf63bb2b97517486f4e1
Make it possible to put QObject tracked with QWeakPointer inside QSharedPointer

Do that by keeping the QWeakPointer that track QObject independent of
the ones that track QSharedPointer.

QSharedPointer do not touch the sharedRefCount in QObjectPrivate anymore

When converting a QWeakPointer constructed from a QObject to a
QSharedPointer, it will display a warning saying one should not do that.

Task-number: QTBUG-22622
Change-Id: I3595e3e7401702410776c458687ab357ad9366ab
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
src/corelib/tools/qsharedpointer.cpp
src/corelib/tools/qsharedpointer_impl.h
tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp