Move the preprocessor iterator for Qt smart pointers with the others.

Use it to forward declare the types.

Change-Id: I48d9e32dcf02471d197a82502d96d60807d11d57
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
bb10
Stephen Kelly 2013-09-06 13:17:57 +02:00 committed by The Qt Project
parent 15a17323ed
commit 0771075f66
1 changed files with 10 additions and 8 deletions

View File

@ -206,6 +206,11 @@ inline Q_DECL_CONSTEXPR int qMetaTypeId();
F(QMap, class) \
F(QPair, struct)
#define QT_FOR_EACH_AUTOMATIC_TEMPLATE_SMART_POINTER(F) \
F(QSharedPointer) \
F(QWeakPointer) \
F(QPointer)
class QDataStream;
class QMetaTypeInterface;
struct QMetaObject;
@ -1234,9 +1239,11 @@ struct QPairVariantInterfaceConvertFunctor<std::pair<T, U> >
class QObject;
class QWidget;
template <class T> class QSharedPointer;
template <class T> class QWeakPointer;
template <class T> class QPointer;
#define QT_FORWARD_DECLARE_SHARED_POINTER_TYPES_ITER(Name) \
template <class T> class Name; \
QT_FOR_EACH_AUTOMATIC_TEMPLATE_SMART_POINTER(QT_FORWARD_DECLARE_SHARED_POINTER_TYPES_ITER)
namespace QtPrivate
{
@ -1844,11 +1851,6 @@ struct QMetaTypeId< SMART_POINTER<T> > \
};\
QT_END_NAMESPACE
#define QT_FOR_EACH_AUTOMATIC_TEMPLATE_SMART_POINTER(F) \
F(QSharedPointer) \
F(QWeakPointer) \
F(QPointer)
#define Q_DECLARE_METATYPE_TEMPLATE_1ARG_ITER(TEMPLATENAME) \
QT_BEGIN_NAMESPACE \
template <class T> class TEMPLATENAME; \