summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
diff options
context:
space:
mode:
authorChristoph Schleifenbaum <christoph.schleifenbaum@kdab.com>2013-03-09 15:12:20 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-08 06:02:35 +0200
commitf7b313e6d865ac7020c3164c2f6f0232f052eb9b (patch)
tree9afb8af0bf8283db844df7f72540613d1ef51319 /tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
parent46d80dedb7794c3e494cc818c85e023beb65626e (diff)
Core: Support for converting user defined QVariant types.
This patchs allows the user to convert defined QMetaType types like MyType to be converted by using e.g. QVariant::toString(), mapping to MyType::toString(). Also all the other QVariant::toXYZ() methods are supported so far. The patch adds static methods QMetaType::registerConverter supporting: - implicit convertion - conversion using member method of source type - conversion using unary functor Change-Id: I4f1db83d9c78bcc9df5c42f82f95cce0480cdcc3 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp')
0 files changed, 0 insertions, 0 deletions