Add constexpr template specializations for built in metatypes.
authorStephen Kelly <stephen.kelly@kdab.com>
Sun, 1 Jul 2012 20:55:54 +0000 (22:55 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 2 Jul 2012 23:08:05 +0000 (01:08 +0200)
commit13e1e30ec39e9039930a25d851bb525ec486a15d
tree1570f7f7700e0ec2763c5b6113db2ea08d966e0c
parent2ec9d34df6003107c865661b8abfb9a9fa38c146
Add constexpr template specializations for built in metatypes.

This will make it possible (in Qt 6) to remove the enums listing
metatype ids. As it is constexpr, it can be used in switch statements
just like enums, as enum values, and as template specialization values.

Change-Id: I51293674c403714e34cb8a8b8953522fc97a740a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
src/corelib/kernel/qmetatype.h
tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp