~ubuntu-branches/ubuntu/oneiric/pyside/oneiric

« back to all changes in this revision

Viewing changes to PySide/QtCore/qvariant_type_conversions.h

  • Committer: Bazaar Package Importer
  • Author(s): Didier Raboud
  • Date: 2010-10-19 22:52:14 UTC
  • mfrom: (1.1.4 upstream)
  • mto: (13.1.1 sid)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20101019225214-0s9fbpz12x3962qa
Tags: upstream-0.4.2
ImportĀ upstreamĀ versionĀ 0.4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
            typeName = "double"; // float is a UserType in QVariant.
26
26
        else if (pyObj == reinterpret_cast<PyObject*>(&PyLong_Type))
27
27
            typeName = "int"; // long is a UserType in QVariant.
28
 
        else if (PyType_Check(pyObj))
29
 
            typeName = reinterpret_cast<PyTypeObject*>(pyObj)->tp_name;
 
28
        else if (PyType_Check(pyObj)) {
 
29
            if (pyObj->ob_type == &Shiboken::SbkBaseWrapperType_Type)
 
30
                typeName = reinterpret_cast<Shiboken::SbkBaseWrapperType*>(pyObj)->original_name;
 
31
            else
 
32
                typeName = reinterpret_cast<PyTypeObject*>(pyObj)->tp_name;
 
33
        }
30
34
        else if (PyString_Check(pyObj))
31
35
            typeName = PyString_AS_STRING(pyObj);
32
36
        else if (PyUnicode_Check(pyObj))