diff options
author | Renato Filho <renato.filho@openbossa.org> | 2010-08-20 17:25:30 -0300 |
---|---|---|
committer | Renato Filho <renato.filho@openbossa.org> | 2010-08-20 18:10:35 -0300 |
commit | 5a06e6f135aae65e314ab4c2002a5923e221a8ac (patch) | |
tree | 0605cc1a22c7e275d4fdda54bff89ba82d23228a | |
parent | 662800956b935bf344dfb8cbfb47f2c3b5717aec (diff) |
Fixed QtNetwork typesystem to work on windows.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Hugo Parente Lima <hugo.pl@gmail.com>
-rw-r--r-- | PySide/QtNetwork/glue/qudpsocket_read_datagram_glue.cpp | 2 | ||||
-rw-r--r-- | PySide/QtNetwork/typesystem_network.xml | 13 | ||||
-rw-r--r-- | PySide/typesystem_templates.xml | 2 |
3 files changed, 15 insertions, 2 deletions
diff --git a/PySide/QtNetwork/glue/qudpsocket_read_datagram_glue.cpp b/PySide/QtNetwork/glue/qudpsocket_read_datagram_glue.cpp index 95ece5193..db38f4526 100644 --- a/PySide/QtNetwork/glue/qudpsocket_read_datagram_glue.cpp +++ b/PySide/QtNetwork/glue/qudpsocket_read_datagram_glue.cpp @@ -1,4 +1,4 @@ - char data[%ARGUMENT_NAMES]; + PySide::AutoArrayPointer<char> data(%ARGUMENT_NAMES); QHostAddress ha; quint16 port; diff --git a/PySide/QtNetwork/typesystem_network.xml b/PySide/QtNetwork/typesystem_network.xml index 9a56b74b9..80a62a4bc 100644 --- a/PySide/QtNetwork/typesystem_network.xml +++ b/PySide/QtNetwork/typesystem_network.xml @@ -10,6 +10,7 @@ <rejection class="QIPv6Address" field-name="c"/> <rejection class="QSslCertificate"/> + <enum-type name="QNetworkConfiguration::BearerType" /> <enum-type name="QAbstractSocket::NetworkLayerProtocol"/> <enum-type name="QAbstractSocket::SocketError"/> <enum-type name="QAbstractSocket::SocketOption"/> @@ -53,6 +54,10 @@ </object-type> <object-type name="QFtp"> + <extra-includes> + <include file-name="autoarraypointer.h" location="global"/> + </extra-includes> + <modify-function signature="connectToHost(const QString&, quint16)" allow-thread="yes" /> <modify-function signature="login(const QString&, const QString&)" allow-thread="yes" /> <modify-function signature="close()" allow-thread="yes" /> @@ -81,6 +86,10 @@ </object-type> <object-type name="QHttp"> + <extra-includes> + <include file-name="autoarraypointer.h" location="global"/> + </extra-includes> + <modify-function signature="closeConnection()" remove="all"/> <modify-function signature="readAll()" allow-thread="yes"/> <modify-function signature="read(char*, qint64)" allow-thread="yes"> @@ -115,6 +124,10 @@ </object-type> <object-type name="QTcpSocket"/> <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-argument index="1"> <remove-argument/> diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml index 1de06a1d6..b8c43eebe 100644 --- a/PySide/typesystem_templates.xml +++ b/PySide/typesystem_templates.xml @@ -121,7 +121,7 @@ %PYARG_0 = Shiboken::makeTuple(a, b, c, d, e); </template> <template name="read_wrapper"> - char _data[%2]; + PySide::AutoArrayPointer<char> _data(%2); qint64 _size = %CPPSELF.%FUNCTION_NAME(_data, %2); if (_size > 0) %PYARG_0 = %CONVERTTOPYTHON[QByteArray](QByteArray(_data, _size)); |