Add some internal API for extracting a QSharedPointer<T> from QVariant.
authorStephen Kelly <stephen.kelly@kdab.com>
Sat, 9 Jun 2012 20:57:35 +0000 (22:57 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 20 Jun 2012 13:45:07 +0000 (15:45 +0200)
commit668efc29fd85bbae2395a4eca8d0ad71ad6ee3d1
treeffccf50b396428156cafb3c6a51ddb87d2359f28
parent534bcc96676ac02fc327f9e43d3785c7424b0750
Add some internal API for extracting a QSharedPointer<T> from QVariant.

The T must be derived from QObject, or it will fail to compile.

This will allow scripting or other 'wrapping' and runtime environments like
QtDeclarative to handle QSharedPointers to types derived from QObject
properly. A QSharedPointer<T> can be inserted into a QVariant, and
where T derives from QObject, a QSharedPointer<QObject> can be
extracted from the QVariant, and its properties are then accessible.

Change-Id: I68d6d89aceceb019267bd7301baa2047f9c09b90
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/corelib/kernel/qpointer.h
src/corelib/tools/qsharedpointer.cpp
src/corelib/tools/qsharedpointer_impl.h
tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp
tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp