aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtDeclarative/pysideqmlregistertype.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'PySide/QtDeclarative/pysideqmlregistertype.cpp')
-rw-r--r--PySide/QtDeclarative/pysideqmlregistertype.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/PySide/QtDeclarative/pysideqmlregistertype.cpp b/PySide/QtDeclarative/pysideqmlregistertype.cpp
index 7dfd7a622..6c595167b 100644
--- a/PySide/QtDeclarative/pysideqmlregistertype.cpp
+++ b/PySide/QtDeclarative/pysideqmlregistertype.cpp
@@ -258,7 +258,10 @@ PyTypeObject PropertyListType = {
void propListAppender(QDeclarativeListProperty<QDeclarativeItem>* propList, QDeclarativeItem* item)
{
Shiboken::GilState state;
- Shiboken::AutoDecRef args(Shiboken::makeTuple(propList->object, item));
+
+ Shiboken::AutoDecRef args(PyTuple_New(2));
+ PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
+ PyTuple_SET_ITEM(args, 1, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtDeclarativeTypes[SBK_QDECLARATIVEITEM_IDX], item));
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->append, args));
@@ -271,7 +274,9 @@ void propListAppender(QDeclarativeListProperty<QDeclarativeItem>* propList, QDec
int propListCount(QDeclarativeListProperty<QDeclarativeItem>* propList)
{
Shiboken::GilState state;
- Shiboken::AutoDecRef args(Shiboken::makeTuple(propList->object));
+
+ Shiboken::AutoDecRef args(PyTuple_New(1));
+ PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->count, args));
@@ -289,7 +294,10 @@ int propListCount(QDeclarativeListProperty<QDeclarativeItem>* propList)
QDeclarativeItem* propListAt(QDeclarativeListProperty<QDeclarativeItem>* propList, int index)
{
Shiboken::GilState state;
- Shiboken::AutoDecRef args(Shiboken::makeTuple(propList->object, index));
+
+ Shiboken::AutoDecRef args(PyTuple_New(2));
+ PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
+ PyTuple_SET_ITEM(args, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &index));
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->at, args));
@@ -306,7 +314,9 @@ QDeclarativeItem* propListAt(QDeclarativeListProperty<QDeclarativeItem>* propLis
void propListClear(QDeclarativeListProperty<QDeclarativeItem>* propList)
{
Shiboken::GilState state;
- Shiboken::AutoDecRef args(Shiboken::makeTuple(propList->object));
+
+ Shiboken::AutoDecRef args(PyTuple_New(1));
+ PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->clear, args));