summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2011-10-06 13:25:58 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-11 16:01:45 +0200
commite5ce564b1d2f2818c36ffbabbaa558c091512e66 (patch)
tree25a8f396b796c641b5f4b49915c1d159c223abc4 /src/widgets
parent612ac2b8c8e0d5c67b17ad3a9a564f5a049846a6 (diff)
Rename QMetaType::construct() to create()
create() is symmetric with destroy(). Also rename the internal methods and fields to be consistent (qDeleteHelper already had the "right" name, though!). This change will allow us to use construct() and destruct() for something else: Placement new-style allocation (QTBUG-12574). The old construct() is still kept for now, until the other repositories have been updated to use create(). Change-Id: Iceb184af6cffcb0a634359cfc3516c718ba0c2f5 Reviewed-on: http://codereview.qt-project.org/6342 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qwidgetsvariant.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/widgets/kernel/qwidgetsvariant.cpp b/src/widgets/kernel/qwidgetsvariant.cpp
index c8ba07fa81..a349e161e3 100644
--- a/src/widgets/kernel/qwidgetsvariant.cpp
+++ b/src/widgets/kernel/qwidgetsvariant.cpp
@@ -135,8 +135,8 @@ static const QVariant::Handler widgets_handler = {
struct QMetaTypeGuiHelper
{
- QMetaType::Constructor constr;
- QMetaType::Destructor destr;
+ QMetaType::Creator creator;
+ QMetaType::Deleter deleter;
#ifndef QT_NO_DATASTREAM
QMetaType::SaveOperator saveOp;
QMetaType::LoadOperator loadOp;
@@ -148,16 +148,16 @@ extern Q_CORE_EXPORT const QMetaTypeGuiHelper *qMetaTypeWidgetsHelper;
#ifdef QT_NO_DATASTREAM
# define Q_DECL_METATYPE_HELPER(TYPE) \
- typedef void *(*QConstruct##TYPE)(const TYPE *); \
- static const QConstruct##TYPE qConstruct##TYPE = qMetaTypeConstructHelper<TYPE>; \
- typedef void (*QDestruct##TYPE)(TYPE *); \
- static const QDestruct##TYPE qDestruct##TYPE = qMetaTypeDeleteHelper<TYPE>;
+ typedef void *(*QCreate##TYPE)(const TYPE *); \
+ static const QCreate##TYPE qCreate##TYPE = qMetaTypeCreateHelper<TYPE>; \
+ typedef void (*QDelete##TYPE)(TYPE *); \
+ static const QDelete##TYPE qDelete##TYPE = qMetaTypeDeleteHelper<TYPE>;
#else
# define Q_DECL_METATYPE_HELPER(TYPE) \
- typedef void *(*QConstruct##TYPE)(const TYPE *); \
- static const QConstruct##TYPE qConstruct##TYPE = qMetaTypeConstructHelper<TYPE>; \
- typedef void (*QDestruct##TYPE)(TYPE *); \
- static const QDestruct##TYPE qDestruct##TYPE = qMetaTypeDeleteHelper<TYPE>; \
+ typedef void *(*QCreate##TYPE)(const TYPE *); \
+ static const QCreate##TYPE qCreate##TYPE = qMetaTypeCreateHelper<TYPE>; \
+ typedef void (*QDelete##TYPE)(TYPE *); \
+ static const QDelete##TYPE qDelete##TYPE = qMetaTypeDeleteHelper<TYPE>; \
typedef void (*QSave##TYPE)(QDataStream &, const TYPE *); \
static const QSave##TYPE qSave##TYPE = qMetaTypeSaveHelper<TYPE>; \
typedef void (*QLoad##TYPE)(QDataStream &, TYPE *); \
@@ -171,12 +171,12 @@ Q_DECL_METATYPE_HELPER(QSizePolicy)
#ifdef QT_NO_DATASTREAM
# define Q_IMPL_METATYPE_HELPER(TYPE) \
- { reinterpret_cast<QMetaType::Constructor>(qConstruct##TYPE), \
- reinterpret_cast<QMetaType::Destructor>(qDestruct##TYPE) }
+ { reinterpret_cast<QMetaType::Creator>(qCreate##TYPE), \
+ reinterpret_cast<QMetaType::Deleter>(qDelete##TYPE) }
#else
# define Q_IMPL_METATYPE_HELPER(TYPE) \
- { reinterpret_cast<QMetaType::Constructor>(qConstruct##TYPE), \
- reinterpret_cast<QMetaType::Destructor>(qDestruct##TYPE), \
+ { reinterpret_cast<QMetaType::Creator>(qCreate##TYPE), \
+ reinterpret_cast<QMetaType::Deleter>(qDelete##TYPE), \
reinterpret_cast<QMetaType::SaveOperator>(qSave##TYPE), \
reinterpret_cast<QMetaType::LoadOperator>(qLoad##TYPE) \
}