Fixed QtNetwork typesystem to work on windows.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
This commit is contained in:
Renato Filho 2010-08-20 17:25:30 -03:00
commit 5a06e6f135
3 changed files with 15 additions and 2 deletions

View file

@ -1,4 +1,4 @@
char data[%ARGUMENT_NAMES]; PySide::AutoArrayPointer<char> data(%ARGUMENT_NAMES);
QHostAddress ha; QHostAddress ha;
quint16 port; quint16 port;

View file

@ -10,6 +10,7 @@
<rejection class="QIPv6Address" field-name="c"/> <rejection class="QIPv6Address" field-name="c"/>
<rejection class="QSslCertificate"/> <rejection class="QSslCertificate"/>
<enum-type name="QNetworkConfiguration::BearerType" />
<enum-type name="QAbstractSocket::NetworkLayerProtocol"/> <enum-type name="QAbstractSocket::NetworkLayerProtocol"/>
<enum-type name="QAbstractSocket::SocketError"/> <enum-type name="QAbstractSocket::SocketError"/>
<enum-type name="QAbstractSocket::SocketOption"/> <enum-type name="QAbstractSocket::SocketOption"/>
@ -53,6 +54,10 @@
</object-type> </object-type>
<object-type name="QFtp"> <object-type name="QFtp">
<extra-includes>
<include file-name="autoarraypointer.h" location="global"/>
</extra-includes>
<modify-function signature="connectToHost(const QString&amp;, quint16)" allow-thread="yes" /> <modify-function signature="connectToHost(const QString&amp;, quint16)" allow-thread="yes" />
<modify-function signature="login(const QString&amp;, const QString&amp;)" allow-thread="yes" /> <modify-function signature="login(const QString&amp;, const QString&amp;)" allow-thread="yes" />
<modify-function signature="close()" allow-thread="yes" /> <modify-function signature="close()" allow-thread="yes" />
@ -81,6 +86,10 @@
</object-type> </object-type>
<object-type name="QHttp"> <object-type name="QHttp">
<extra-includes>
<include file-name="autoarraypointer.h" location="global"/>
</extra-includes>
<modify-function signature="closeConnection()" remove="all"/> <modify-function signature="closeConnection()" remove="all"/>
<modify-function signature="readAll()" allow-thread="yes"/> <modify-function signature="readAll()" allow-thread="yes"/>
<modify-function signature="read(char*, qint64)" allow-thread="yes"> <modify-function signature="read(char*, qint64)" allow-thread="yes">
@ -115,6 +124,10 @@
</object-type> </object-type>
<object-type name="QTcpSocket"/> <object-type name="QTcpSocket"/>
<object-type name="QUdpSocket"> <object-type name="QUdpSocket">
<extra-includes>
<include file-name="autoarraypointer.h" location="global"/>
</extra-includes>
<modify-function signature="readDatagram(char*, qint64, QHostAddress*, quint16*)" allow-thread="yes"> <modify-function signature="readDatagram(char*, qint64, QHostAddress*, quint16*)" allow-thread="yes">
<modify-argument index="1"> <modify-argument index="1">
<remove-argument/> <remove-argument/>

View file

@ -121,7 +121,7 @@
%PYARG_0 = Shiboken::makeTuple(a, b, c, d, e); %PYARG_0 = Shiboken::makeTuple(a, b, c, d, e);
</template> </template>
<template name="read_wrapper"> <template name="read_wrapper">
char _data[%2]; PySide::AutoArrayPointer&lt;char&gt; _data(%2);
qint64 _size = %CPPSELF.%FUNCTION_NAME(_data, %2); qint64 _size = %CPPSELF.%FUNCTION_NAME(_data, %2);
if (_size > 0) if (_size > 0)
%PYARG_0 = %CONVERTTOPYTHON[QByteArray](QByteArray(_data, _size)); %PYARG_0 = %CONVERTTOPYTHON[QByteArray](QByteArray(_data, _size));