aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtCore
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-04-06 19:04:56 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:08 -0300
commitc06cec65df9db1b580cb24d43bfc6a5f46b20f17 (patch)
treeaf76f7f32fa13d995b558a2d78f8e2b56a7e0bd6 /PySide/QtCore
parent6ef7460a47674072b2dd2f8521bea8c84f7153d5 (diff)
Fix bug 724 - "Missing QAbstractFileEngine.map method"
Diffstat (limited to 'PySide/QtCore')
-rw-r--r--PySide/QtCore/typesystem_core.xml22
1 files changed, 18 insertions, 4 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index 4a7456bd3..edd4facd1 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -232,7 +232,6 @@
<rejection class="QAbstractFileEngine" function-name="beginEntryList"/>
<rejection class="QAbstractFileEngine" function-name="endEntryList"/>
<rejection class="QAbstractFileEngine" function-name="extension"/>
- <rejection class="QAbstractFileEngine" function-name="map"/>
<rejection class="QCoreApplication" function-name="compressEvent"/>
<rejection class="QCoreApplication" function-name="eventFilter"/>
<rejection class="QCoreApplication" function-name="filterEvent"/>
@@ -2070,7 +2069,7 @@
</inject-code>
</add-function>
</object-type>
- <object-type name="QAbstractFileEngineHandler"/>
+ <object-type name="QAbstractFileEngineHandler" />
<!-- <object-type name="QAbstractFileEngine::MapExtensionOption" /> -->
<!-- <object-type name="QAbstractFileEngine::MapExtensionReturn" /> -->
<!-- <object-type name="QAbstractFileEngine::UnMapExtensionOption" /> -->
@@ -2096,8 +2095,23 @@
<modify-function signature="rmdir(const QString&amp;, bool)const" allow-thread="yes" />
<modify-function signature="write(const char*, qint64)" allow-thread="yes" />
- <!-- ### See bug 724 -->
- <modify-function signature="unmap(uchar*)" remove="all"/>
+ <modify-function signature="unmap(uchar*)">
+ <modify-argument index="1">
+ <replace-type modified-type="PyBuffer"/>
+ </modify-argument>
+ <inject-code>
+ const void* ptr;
+ Py_ssize_t len;
+ PyObject_AsReadBuffer(%PYARG_1, &amp;ptr, &amp;len);
+ %PYARG_0 = %CONVERTTOPYTHON[bool](%CPPSELF.%FUNCTION_NAME((uchar*)ptr));
+ </inject-code>
+ </modify-function>
+ <modify-function signature="map(qint64,qint64,QFile::MemoryMapFlags)">
+ <inject-code>
+ %PYARG_0 = PyBuffer_FromReadWriteMemory(%CPPSELF.%FUNCTION_NAME(%1, %2, %3), %2);
+ </inject-code>
+ </modify-function>
+
<!-- ### See bug 723 -->
<modify-function signature="read(char*, qint64)" allow-thread="yes" remove="all" />
<modify-function signature="readLine(char*, qint64)" allow-thread="yes" remove="all" />