summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
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 /doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
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 'doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp')
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
index 35e6feb523..eb913f4231 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
@@ -74,7 +74,7 @@ MyStruct s2 = var.value<MyStruct>();
//! [3]
int id = QMetaType::type("MyClass");
if (id == 0) {
- void *myClassPtr = QMetaType::construct(id);
+ void *myClassPtr = QMetaType::create(id);
...
QMetaType::destroy(id, myClassPtr);
myClassPtr = 0;