summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2014-04-15 17:05:52 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-22 10:19:27 +0200
commit969da85c2b6523432af1728cbb5ee311652decb0 (patch)
tree24e83ae83a87a97d917657ff3748036a4a72c14b /src
parent9b8dd3012cc8b2a71acb324485f1541a01171838 (diff)
QMetaType: Specialize IsPointerToTypeDerivedFromQObject for const void*
'const void' is not derived from QObject, and is not a type we can use sizeof to determine that. Change-Id: I008f444bbed9fc8f9147da0f7f336757f660e224 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qmetatype.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index 0a52aaf680..ad853d5b03 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -1277,6 +1277,11 @@ namespace QtPrivate
enum { Value = false };
};
template<>
+ struct IsPointerToTypeDerivedFromQObject<const void*>
+ {
+ enum { Value = false };
+ };
+ template<>
struct IsPointerToTypeDerivedFromQObject<QObject*>
{
enum { Value = true };