summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-03-31 12:13:12 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-03-31 12:17:36 (GMT)
commitb620b46ec07879c1baa35d59f3baa00fde88a3b8 (patch)
tree10a1b81230cc973ba2fe1cc6604cacd68f588d13 /doc
parent6efb2e5836da7f83ec484bc93230649d027fb0c9 (diff)
downloadQt-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.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 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);