diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-03-31 12:13:12 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-03-31 12:17:36 (GMT) |
commit | b620b46ec07879c1baa35d59f3baa00fde88a3b8 (patch) | |
tree | 10a1b81230cc973ba2fe1cc6604cacd68f588d13 /doc | |
parent | 6efb2e5836da7f83ec484bc93230649d027fb0c9 (diff) | |
download | Qt-b620b46ec07879c1baa35d59f3baa00fde88a3b8.zip Qt-b620b46ec07879c1baa35d59f3baa00fde88a3b8.tar.gz Qt-b620b46ec07879c1baa35d59f3baa00fde88a3b8.tar.bz2 |
Detailed description of QMetaType contradicts documentation of QMetaType::type()
QMetaType::type() returns 0 for unknown types, not -1.
Task-number: 248890
Reviewed By: Kavindra Devi Palaraja <kavindra.palaraja@nokia.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp | 2 |
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 355a237..783852b 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp @@ -33,7 +33,7 @@ MyStruct s2 = var.value<MyStruct>(); //! [3] int id = QMetaType::type("MyClass"); -if (id != -1) { +if (id == 0) { void *myClassPtr = QMetaType::construct(id); ... QMetaType::destroy(id, myClassPtr); |