diff options
author | Jędrzej Nowacki <jedrzej.nowacki@nokia.com> | 2011-10-26 11:09:29 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-09 10:11:14 +0100 |
commit | 2b39be6dd5d111482e5df06ac6dea18ca338d9f0 (patch) | |
tree | 13f9b75bdb796db88330f6b67e38e0619254adaf /src/corelib/kernel/qvariant_p.h | |
parent | eda469d3a093b488d3cff64e0f8e3c69d34bf84a (diff) |
Implement QMetaTypeSwitcher.
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>
Diffstat (limited to 'src/corelib/kernel/qvariant_p.h')
0 files changed, 0 insertions, 0 deletions