65 lines
1.3 KiB
Diff
65 lines
1.3 KiB
Diff
--- qgis-1.5.0/python/core/conversions.sip 2010-04-20 14:25:42.000000000 +0200
|
|
+++ qgis-1.5.0-sip411/python/core/conversions.sip 2010-09-11 23:37:45.828329803 +0200
|
|
@@ -263,61 +263,6 @@
|
|
};
|
|
|
|
|
|
-
|
|
-
|
|
-%MappedType QSet<int>
|
|
-{
|
|
-%TypeHeaderCode
|
|
-#include <QSet>
|
|
-#if (SIP_VERSION >= 0x040900)
|
|
-#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
|
|
-#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
|
|
-#endif
|
|
-%End
|
|
-
|
|
-%ConvertFromTypeCode
|
|
- // Create the list.
|
|
- PyObject *l;
|
|
-
|
|
- if ((l = PyList_New(sipCpp->size())) == NULL)
|
|
- return NULL;
|
|
-
|
|
- // Set the list elements.
|
|
- QSet<int>::iterator it = sipCpp->begin();
|
|
- for (int i = 0; it != sipCpp->end(); ++it, ++i)
|
|
- {
|
|
- PyObject *tobj;
|
|
-
|
|
- if ((tobj = PyInt_FromLong(*it)) == NULL)
|
|
- {
|
|
- Py_DECREF(l);
|
|
- return NULL;
|
|
- }
|
|
- PyList_SET_ITEM(l, i, tobj);
|
|
- }
|
|
-
|
|
- return l;
|
|
-%End
|
|
-
|
|
-%ConvertToTypeCode
|
|
- // Check the type if that is all that is required.
|
|
- if (sipIsErr == NULL)
|
|
- return PyList_Check(sipPy);
|
|
-
|
|
- QSet<int> *qset = new QSet<int>;
|
|
-
|
|
- for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
|
|
- {
|
|
- qset->insert(PyInt_AsLong(PyList_GET_ITEM(sipPy, i)));
|
|
- }
|
|
-
|
|
- *sipCppPtr = qset;
|
|
- return sipGetState(sipTransferObj);
|
|
-%End
|
|
-
|
|
-};
|
|
-
|
|
-
|
|
template <TYPE>
|
|
%MappedType QSet<TYPE>
|
|
{
|