diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2009-11-18 18:57:22 -0200 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2009-11-19 15:53:37 -0200 |
commit | f1962c58cbb914681e19c843918c29811d0e61c9 (patch) | |
tree | c8eff6c0ad3ff347270b6f902d76dd2ba9090e47 /PySide | |
parent | 6a759410d33623472c0dc635336275f0596dda64 (diff) |
Added QModelIndex::internalPointer and QAbstractItemModel::createIndex functions.
Diffstat (limited to 'PySide')
-rw-r--r-- | PySide/QtCore/typesystem_core.xml | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml index 67ca7ec92..9d3f70a2b 100644 --- a/PySide/QtCore/typesystem_core.xml +++ b/PySide/QtCore/typesystem_core.xml @@ -1170,9 +1170,18 @@ </object-type> <object-type name="QAbstractFileEngineIterator"/> <object-type name="QAbstractItemModel"> - <modify-function signature="createIndex(int, int, int) const" remove="all"/> - <modify-function signature="createIndex(int, int, unsigned int) const" remove="all"/> <modify-function signature="createIndex(int, int, void*) const" remove="all"/> + <modify-function signature="createIndex(int,int,quint32)const" remove="all" /> + <modify-function signature="createIndex(int, int, int) const"> + <modify-argument index="3"> + <replace-default-expression with="0" /> + </modify-argument> + </modify-function> + <add-function signature="createIndex(int,int,PyObject*)const" return-type="QModelIndex"> + <inject-code class="target" position="beginning"> + %0 = %CONVERTTOPYTHON[%RETURN_TYPE](%CPPSELF.createIndex(%1, %2, %PYARG_3)); + </inject-code> + </add-function> <!-- These signals are private, because only QAbstractItemModel can emit then --> <modify-function signature="rowsAboutToBeInserted(const QModelIndex&,int,int)" remove="all" /> @@ -2183,7 +2192,14 @@ <!--TODO--> </object-type> <value-type name="QModelIndex"> - <modify-function signature="internalPointer()const" remove="all"/> + <modify-function signature="internalPointer()const"> + <inject-code class="target" position="beginning"> + %0 = (PyObject*)%CPPSELF.%FUNCTION_NAME(); + if (!%0) + %0 = Py_None; + Py_XINCREF(%0); + </inject-code> + </modify-function> </value-type> <value-type name="QGenericArgument"> |