summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetatype_p.h
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@digia.com>2012-09-21 13:45:07 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-27 02:37:19 +0200
commit60d096ff6d24a77f1c156c8354232a44e8516872 (patch)
treeacb952d2f87fae34b8f232d1c59fb840c3681286 /src/corelib/kernel/qmetatype_p.h
parentb5b8fdb915e7d57128b807f5640f418c2fd7cc85 (diff)
QMetaType build fix with Q_NO_CURSOR and friends.
QMetaType has a way to "switch off" some types from the build. QtMetaTypePrivate::TypeDefinition<T>::IsAvailable is defined as false for all unaccessible types. Sadly that information was never used by gui and widget handlers. The patch implements it. Change-Id: Ie5835be4c88cfbbca8a4e9199e31ddfc20cae190 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jing Bai <jing.bai@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qmetatype_p.h')
-rw-r--r--src/corelib/kernel/qmetatype_p.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/kernel/qmetatype_p.h b/src/corelib/kernel/qmetatype_p.h
index 3b1d95b1d8..351baa9aaa 100644
--- a/src/corelib/kernel/qmetatype_p.h
+++ b/src/corelib/kernel/qmetatype_p.h
@@ -135,8 +135,8 @@ public:
#ifndef QT_NO_DATASTREAM
# define QT_METATYPE_INTERFACE_INIT_DATASTREAM_IMPL(Type) \
- /*saveOp*/(qMetaTypeSaveHelper<Type>), \
- /*loadOp*/(qMetaTypeLoadHelper<Type>),
+ /*saveOp*/(QtMetaTypePrivate::QMetaTypeFunctionHelper<Type, QtMetaTypePrivate::TypeDefinition<Type>::IsAvailable>::Save), \
+ /*loadOp*/(QtMetaTypePrivate::QMetaTypeFunctionHelper<Type, QtMetaTypePrivate::TypeDefinition<Type>::IsAvailable>::Load),
# define QT_METATYPE_INTERFACE_INIT_EMPTY_DATASTREAM_IMPL(Type) \
/*saveOp*/ 0, \
/*loadOp*/ 0,
@@ -156,11 +156,11 @@ public:
#define QT_METATYPE_INTERFACE_INIT_IMPL(Type, DATASTREAM_DELEGATE) \
{ \
- /*creator*/(qMetaTypeCreateHelper<Type>), \
- /*deleter*/(qMetaTypeDeleteHelper<Type>), \
+ /*creator*/(QtMetaTypePrivate::QMetaTypeFunctionHelper<Type, QtMetaTypePrivate::TypeDefinition<Type>::IsAvailable>::Create), \
+ /*deleter*/(QtMetaTypePrivate::QMetaTypeFunctionHelper<Type, QtMetaTypePrivate::TypeDefinition<Type>::IsAvailable>::Delete), \
DATASTREAM_DELEGATE(Type) \
- /*constructor*/(qMetaTypeConstructHelper<Type>), \
- /*destructor*/(qMetaTypeDestructHelper<Type>), \
+ /*constructor*/(QtMetaTypePrivate::QMetaTypeFunctionHelper<Type, QtMetaTypePrivate::TypeDefinition<Type>::IsAvailable>::Construct), \
+ /*destructor*/(QtMetaTypePrivate::QMetaTypeFunctionHelper<Type, QtMetaTypePrivate::TypeDefinition<Type>::IsAvailable>::Destruct), \
/*size*/(QTypeInfo<Type>::sizeOf), \
/*flags*/QtPrivate::QMetaTypeTypeFlags<Type>::Flags, \
/*metaObject*/METAOBJECT_DELEGATE(Type) \