From b620b46ec07879c1baa35d59f3baa00fde88a3b8 Mon Sep 17 00:00:00 2001
From: "Bradley T. Hughes" <bradley.hughes@nokia.com>
Date: Tue, 31 Mar 2009 14:13:12 +0200
Subject: 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>
---
 doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
-- 
cgit v0.12