summaryrefslogtreecommitdiffstats
path: root/PySide/QtDeclarative/pysideqmlregistertype.cpp
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-12-01 17:32:48 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2011-12-09 19:25:36 -0300
commitc93001f792db0de9eede4ef14ba365ea21470f78 (patch)
treedd37b14d19cd80cd2e985ebf23ea92937539ae9e /PySide/QtDeclarative/pysideqmlregistertype.cpp
parent55ac5ba259680881e46a6e35bd7453b5d9f0df5d (diff)
downloadpyside-c93001f792db0de9eede4ef14ba365ea21470f78.tar.gz
pyside-c93001f792db0de9eede4ef14ba365ea21470f78.tar.xz
pyside-c93001f792db0de9eede4ef14ba365ea21470f78.zip
Removed the remaining occurrences of Shiboken::makeTuple.
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 7dfd7a6..6c59516 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));