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>
Add QVariant container iteration API.

A new set of classes is introduced for iterating over the contents
of a container within a QVariant without knowing the exact type of
the container, but with the guarantee that the element type within
the container is a metatype.

The implementation of the iterable interface uses
the stl-compatible container API so that we can also iterate over stl
containers, or any other container which also conforms to stl norms.

This enables the functionality in the bug report.

Task-number: QTBUG-23566

Change-Id: I92a2f3458516de201b8f0e470982c4d030e8ac8b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Add QVariantList extraction from a QVariant with a sequential container.

Change-Id: Id9fac7bf47ed3fbb385222b25941215ac24b8b88
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Add a pair of constructor/assignment function pairs to QPair

To allow copying one QPair of two types to a QPair of two different
types.

Change-Id: Ie7aa84cf5a361be6b7d242517578172c35bcacfd
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Fix the assert failure in QShortcutMap::find

Don't send Qt::Key_unknown down the shortcut handling pipe, because
unknown keys are not part of a shortcut sequence and results in an assert.

Task-number: QTBUG-30871
Change-Id: Idd451fb793bd07124a96d75ed7b936f7ff584f28
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Add automatic container access registration for built-in containers.

Change-Id: I4d590c23e072994930922ff73367600f848fbcf0
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Fix since version of new metatype conversion functions.

Change-Id: Icedd0942eaef9bdcf034d747f0a03a00ca461a95
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>