summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetatype.h
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2015-02-10 09:37:21 +0100
committerOlivier Goffart (Woboq GmbH) <ogoffart@woboq.com>2015-02-14 00:25:01 +0000
commit2ad8c14d386470893da19568e4225fcb3bf58914 (patch)
treec0e416b665570ba5d07dd20fdc2d34741a8d3223 /src/corelib/kernel/qmetatype.h
parent9ddfa43e023f06387eb3360cc2e15bfff68ffe5f (diff)
QMetaType: improve docs and comments
Change-Id: I7bcc8cec95eb5abda75d936732b1113b943622dc Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/kernel/qmetatype.h')
-rw-r--r--src/corelib/kernel/qmetatype.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index b743e78890..9659c015ff 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -1369,6 +1369,9 @@ namespace QtPrivate
template<typename T>
struct IsQEnumHelper {
static const T &declval();
+ // If the type was declared with Q_ENUM, the friend qt_getEnumMetaObject(T) declared in the
+ // Q_ENUM macro will be chosen by ADL, and the return type will be QMetaObject*.
+ // Otherwise the chosen overload will be qt_getEnumMetaObject(...) which returne 'char'
enum { Value = sizeof(qt_getEnumMetaObject(declval())) == sizeof(QMetaObject*) };
};