Fix QObject to QVariant conversion
Fix QObject to QVariant conversion

When a Python object inherits QObject, and is asked to be converted to
a QVariant, QVariant_resolveMetaType is used to find the meta type
closest to the derived object. In case of a class that inherits
multiple classes, the function goes through each of them.

One such case is QQuickWindow, which inherits from QObject and
QSurface.

QVariant_resolveMetaType made an incorrect assumption that
in case of multiple inheritance, the first derived class is stored
in type->tp_base, which is not the case. This led to the QObject
class not being found in the QQuickWindow base chain, and thus
returned an invalid type name.

Fix consists in iterating over every type->tp_bases base before
checking type->tp_base.

Change-Id: I65646f38f85bdf28b6d3fbf342bdaccc7355c7d4
Task-number: PYSIDE-355
Reviewed-by: Christian Tismer <3f32342346a37828fd9c8841ea4579d28b46cf08@stackless.com>

qtproject/pyside-pyside,qtproject/pyside-pyside,qtproject/pyside-pyside,qtproject/pyside-pyside,qtproject/pyside-pyside