summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetatypeswitcher_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix Qt namespace compilation.Toby Tomkins2011-11-161-0/+4
| | | | | Change-Id: I259b5fde8e4d75d28def8650c4c9208accdf0bbe Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Implement QMetaTypeSwitcher.Jędrzej Nowacki2011-11-091-0/+101
Currently one of the most common coding pattern, when working with QMetaType types, is to switch over all types ids to convert a given type id to a real c++ type. The pattern is not perfect, because of: - code duplication - to convert type id to a real type a user has to write own switch case - maintenance - adding new type to QMetaType::Types doesn't propagate to other parts of code. Proposed type switcher can solve the issue by switching type id and delegating found c++ type. The class is created for internal use only and was created to simplify common problems in QtDeclarative, QtScript and QVariant. Change-Id: I0567ef908024b3b05ee18126f98a73a74748fbd2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>