diff --git a/python/core/conversions.sip b/python/core/conversions.sip index a20ebbf6824..6c21a1a1f8d 100644 --- a/python/core/conversions.sip +++ b/python/core/conversions.sip @@ -680,11 +680,6 @@ template PyObject *kobj, *tobj, *kobj2, *tobj2; Py_ssize_t i = 0; - //TODO: it works using SIP -#if (SIP_VERSION >= 0x041200) - const sipMappedType* qmap2 = sipFindMappedType("QMap"); -#endif - // Check the type if that is all that is required. if (sipIsErr == NULL) { @@ -696,17 +691,12 @@ template if (!PyDict_Check(tobj)) return 0; -#if (SIP_VERSION >= 0x041200) - if (!sipCanConvertToMappedType(tobj, qmap2, SIP_NOT_NONE)) - return 0; -#else Py_ssize_t j = 0; while (PyDict_Next(tobj, &j, &kobj2, &tobj2)) { if (!sipCanConvertToType(tobj2, sipType_TYPE, SIP_NOT_NONE)) return 0; } -#endif } return 1; } @@ -717,24 +707,6 @@ template { qint64 k = PyLong_AsLongLong(kobj); -#if (SIP_VERSION >= 0x041200) - // TODO: search for the minimum SIP version this code works on, it works - // on SIP 4.13.3 (GS). See #else to know why the version check is needed. - - int state; - - TYPE* t = reinterpret_cast(sipConvertToMappedType(tobj, qmap2, sipTransferObj,SIP_NOT_NONE,&state,sipIsErr)); - - if (*sipIsErr) - { - sipReleaseMappedType(t, qmap2, state); - delete qm; - return 0; - } - - qm.insert(k, *t); - sipReleaseMappedType(t, qmap2, state); -#else // using sipConvertToMappedType to convert directly to QMap doesn't work // and ends with a segfault @@ -759,7 +731,6 @@ template sipReleaseType(t2, sipType_TYPE, state); } qm->insert(k, qm2); -#endif } *sipCppPtr = qm;