diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2014-07-03 13:38:59 +0200 |
---|---|---|
committer | Olivier Goffart <ogoffart@woboq.com> | 2014-07-08 16:13:17 +0200 |
commit | 813af5f0655c332b2853d156b91c5265b85cbc70 (patch) | |
tree | e5d7337b93fbf436dc5b8e811de19cae752681b4 /src/corelib/global/qtypeinfo.h | |
parent | 84e189502ac5849d89dedff491b1a5d9c5de793e (diff) |
Remove QHashDummyNode and avoid undifined behavior
A lot of code in QHash is doing casting to QHashNode while the pointer
may be of type QHashDummyNode. This is a lot of undefined behavior.
Remove QHashDummyNode and specialize QHashNode for QHashDummyValue instead.
QHashDummyValue is the only type for which QTypeInfo::isDummy is true.
Q_DUMMY and QTypeInfo::isDummy are internal API, so is QHashDummyNode, so
we can remove them.
Task-number: QTBUG-40029
Change-Id: I60c2ff0933075b9202bde89a9992746052f75133
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qtypeinfo.h')
-rw-r--r-- | src/corelib/global/qtypeinfo.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h index 8478e08416..70dc623e0c 100644 --- a/src/corelib/global/qtypeinfo.h +++ b/src/corelib/global/qtypeinfo.h @@ -64,7 +64,7 @@ public: isComplex = true, isStatic = true, isLarge = (sizeof(T)>sizeof(void*)), - isDummy = false, + isDummy = false, //### Qt6: remove sizeOf = sizeof(T) }; }; |